Claude Code 2.1.304 warns before a resume eats your limit

Claude Code 2.1.304, released October 19, makes Pro and Max users confirm before they resume an inactive conversation that would use a noticeable share of their 5-hour usage limit. Anthropic’s release notes on GitHub don’t put a number on “noticeable”. In the shipped binary we found a default threshold of 5%, and the dialog shows the estimated share itself.
The release has 76 entries. Most are fixes, and several of them concern lost work: a worktree removed at exit without asking, and transcripts and tool output dropped when the disk filled up. Mods get a stricter permission answer and a way to enforce organization settings. Skill hooks get hard caps, and tool search is now on by default behind custom gateways.
How the resume prompt works
The dialog is titled “Resume this conversation?” and states the cost: the conversation “has been inactive for” a given time, is N tokens long, and resuming it “will use about X% of your 5-hour usage limit”. When the estimate reaches 100%, the line reads “all” instead of a percentage. You can resume anyway, or start a new conversation. In a new conversation Claude can look up the previous one if you refer to it.
The cost comes from the prompt cache, which lets the API reuse a conversation prefix it has already processed at a lower price. Once the cache expires, a resumed conversation gets re-read in full. The code checks this. The warning appears only when the time since the last request is at least the cache lifetime: by default 1 hour for the main thread, 5 minutes otherwise, or whatever lifetime was recorded for the last request. A model switch since the last message also counts, because the cache is cold either way.
We also found three cases where the dialog stays hidden. It doesn’t appear when the account is already rate-limited or in overage, when prompt caching is disabled for that model, or after you have dismissed it once. Before estimating, the code caps the conversation’s size at the model’s context window. The estimate multiplies the token count by a per-model credit price and divides by the plan tier’s 5-hour credit budget. Neither of those values is in the binary, and by our reading of the code they arrive in a remote config. So the code alone can’t tell you how many tokens trigger the 5% threshold. The code also has an idle-triggered version of the same dialog behind a separate flag. We found it in the code but didn’t see it run.
A related fix covers self-paced /loop wakeups. When one was scheduled at the 1-hour maximum, it fired just after the 1-hour prompt cache expired and re-read the conversation uncached. That no longer happens. /usage now says when a rate limit on usage data ends instead of “try again in a moment”. Resumed sessions got cheaper on the client side too: memory use is down for long or resumed conversations, and in SDK and headless mode the first request after resuming a large compacted session goes out sooner.
Fixes that protected work
The fix most likely to have cost someone commits is in claude --worktree. At exit, it could remove the worktree and its branch without asking when HEAD was detached or on another branch. Now you get asked. There’s also a new safety prompt for rm -r on a mounted drive or a top-level folder (/Volumes, /media, WSL’s /mnt/c), matching the prompt rm -rf /Applications already got.
Two fixes involve a full disk. CLAUDE_CODE_TRANSCRIPT_LOCAL_GC could drop messages from the saved transcript if the disk filled up while the file was being trimmed. Bash and PowerShell deleted a large command’s output file when it couldn’t be copied to the session’s tool-results folder. That deletion now happens only when the disk is full.
Agent runs had their own bugs. A plugin could keep a headless run going past --max-turns, Stop or ended input by spawning subagents or re-running a finished one. Subagents sometimes forgot their most recent work when messaged or resumed right after finishing. In agent teams, approving a shutdown request from the main session exited the whole CLI. If you stopped a turn while Claude Code was compacting a conversation the API had rejected as too long, you could hit “Context limit reached” or “Prompt is too long”. And CLAUDE_CODE_AUTO_COMPACT_WINDOW=200k silently set a 100K window. The variable now accepts k and M suffixes like --autocompact, and it warns when a value is out of range or ignored.
Mods, hooks and skills
A mod’s tool.check answer can now set decider: "person". With it, only the permission dialog or a host’s callback can approve the ask. Where nobody can be asked, the call is refused with the mod’s reason. The same event now carries e.isReadOnly, which is set for read-only tool calls. When a plugin that runs first skips one of your mod’s hooks, a transcript line names the event and the plugin.
For administrators, the larger change is in settings.read hooks. They now receive each settings layer and can rewrite the merged settings. That lets a managed mod make an organization’s setting a ceiling, including the cleanupPeriodDays value the retention sweep uses. A failed mod reload no longer removes the tools and commands of the version that stays loaded. claude plugin validate no longer prints notes predicting where a mod’s hooks would run.
Skill hooks now have a cap. The skills of one source (a repo, your own folder or a plugin) can register at most 1,024 hooks and 16,384 matcher characters per session. Under a policy that allows hooks from plugins only, a skill used in the main conversation whose hooks are kept out also loses its allowed-tools. After compaction, Claude Code sends Claude the skill list again, and /reload-skills sends only new or changed skills. A separate fix stops resumed and cloud sessions from resending the whole skill list each time plugins reloaded at startup. In the transcript view (Ctrl+O), the compaction summary now lists the tools called earlier.
Gateways, cloud and Code Review
Tool search is now on by default when ANTHROPIC_BASE_URL points to a custom endpoint. If the gateway answers 400 or 422, the request is retried without tool search. Another gateway error, “context_management: Extra inputs are not permitted”, now triggers a resend without that field. /auto-mode-setup is a guided setup that reads your project and recent sessions to teach auto mode about your environment. It now also works on Bedrock, Vertex, Foundry, the Claude apps gateway and telemetry-disabled sessions. In auto mode, session files get smaller because the safety classifier’s context is no longer stored with every request.
/claude-api managed-agents-secure compares a Managed Agents agent’s settings with Anthropic’s published security guide and changes nothing. In cloud sessions, a new conversation’s first turn no longer waits for the local (stdio) MCP servers of plugins synced from claude.ai, unless a server sets alwaysLoad: true. Scheduled Cowork cloud sessions no longer wait five minutes for each subagent whose WebFetch needed a URL approval nobody was there to give. The /fast dialog on Opus 5.5 no longer carries the ”(research preview)” label.
Code Review gets review levels. Owners choose Quick, Standard (the default) or Deep for the organization, and they can give individual repositories their own level. A new admin option reviews every repository in a GitHub organization, including ones added later. Before this release, pull requests opened within a minute or two of an admin turning Code Review on were skipped without notice. They are now retried and reviewed.
Our analysis
What we checked
On October 20 we installed @anthropic-ai/claude-code@2.1.304 from npm, opened the Linux x64 binary it downloads, and read the code behind the resume warning, the gateway fallback, the hook caps and the compaction window. We also ran Anthropic’s compaction-window parser, copied unchanged from that binary, on sample inputs.
The code confirms each of these entries and adds the numbers the one-line descriptions leave out. A gateway’s refusal of tool search is remembered for a day. A skill that goes over the hook cap loses all of its hooks. And the compaction-window variable reads a bare number differently from the flag with the same purpose.
- Tool search: after a 400 or 422, Claude Code keeps tool search off for that endpoint and model for 24 hours.
ENABLE_TOOL_SEARCH=falseskips the refused request, and=truealways sends tool search and turns the recovery off. Billing errors don’t trigger the retry. - Hook caps: the 1,024 and 16,384 limits match the notes. A matcher’s characters count once for each hook it applies to. A skill that would cross either limit registers none of its hooks, gets no tools and triggers a warning. A single matcher is separately capped at 2,048 characters.
- Near-limit wrap-up: the hint “Approaching your 5-hour usage limit — Claude will wrap up the current step” arms at 95% of the 5-hour limit by default, 99% on Max 5x and 99.75% on Max 20x. It doesn’t arm when overage is allowed. We found this in 2.1.304 but didn’t check 2.1.303, so we can’t say it’s new.
- Compaction window:
CLAUDE_CODE_AUTO_COMPACT_WINDOWaccepts 100k to 1M tokens.2Mand1.5Mare clamped to 1M,99kis raised to 100k, and non-numeric values are ignored. A bare number is read as tokens. So=200falls below the minimum and is raised to 100k with a warning, while--autocompact 200means 200k.
Up next
Sydney man arrested after Interpol flagged his Claude chat
A 29-year-old in Sydney told Claude in voice mode that he planned to shoot children at a childcare center. Interpol flagged the chat, and police arrested him on Sunday.
Related stories
- Claude Code 2.1.302 adds an off switch for idle compaction
- Claude Code cloud credit has to be claimed by Oct 7
- Leak puts expandable usage limits in Claude Code desktop
- Claude Code gets a wrap-up budget at the 5-hour limit
- Claude Code cloud sessions go GA with credit outside limits
- Claude Code can now resume itself after a limit reset
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

