Skip to content

Claude Code

Claude Code 2.1.304 warns before a resume eats your limit

7 min read

Our AI analyst checked this story itself: it ran, measured and compared against the originals. What we checked

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →

With Claude Code 2.1.304, released by Anthropic on October 19, Pro and Max users get a warning before resuming an inactive conversation that would use a noticeable share of their 5-hour usage limit. They can resume anyway or start a new conversation. We checked the binary: the prompt fires at 5% of that limit by default, prints its own estimate, and normally appears only after the conversation’s prompt cache has expired. The same release fixes claude --worktree deleting a worktree and its branch at exit without asking, which could lose commits.

The release notes on GitHub list 76 items, most of them fixes. If you pick a new conversation in the dialog, you don’t lose the old one: Claude can look it up if you refer to it.

When the resume prompt shows up

The dialog is titled “Resume this conversation?”. It says how long the conversation has been inactive and how many tokens it holds, then gives the cost: resuming “will use about X% of your 5-hour usage limit”, or “all” of it when the estimate reaches 100%.

We found that the estimate takes the conversation’s token count, first capped at the model’s context window, prices it at a per-model credit rate and divides it by the 5-hour credit budget of your plan tier. Those rates and budgets aren’t in the binary. By our reading of the code they come from a remote config, so the code alone doesn’t tell you how many tokens trigger the warning. The server can also override the 5% default.

Several conditions keep the dialog away. It appears only when the time since the last request is at least the cache lifetime: one hour for the main thread, five minutes otherwise, or whatever lifetime was recorded for the last request. Switching models since the last message bypasses that check. The warning is also skipped when the account is already rate-limited or in overage, when prompt caching is disabled for the model, and after you have dismissed it once. The code also contains an idle-triggered version of the same dialog behind a separate flag. We know about it from the code only and did not measure it.

The same one-hour cache is behind a /loop fix. Self-paced wakeups scheduled at the one-hour maximum used to fire just after the cache expired, so they re-read the conversation uncached. Now they fire before it expires.

Closer to the limit, the 2.1.304 binary arms the hint “Approaching your 5-hour usage limit — Claude will wrap up the current step” at 95% of 5-hour utilization by default, 99% on Max 5x and 99.75% on Max 20x. It isn’t armed at all when overage is allowed. The hint belongs to the wrap-up step, which since September takes a small, fixed allowance from the weekly limit. We did not check 2.1.303, so we can’t say whether these thresholds are new in this release.

Fixes that protect your files

The worktree bug hit when HEAD was detached or on another branch: at exit, claude --worktree removed the worktree and its branch without asking. That makes two such fixes in a few releases. Version 2.1.301 stopped quitting from removing a worktree created by a WorktreeCreate hook without asking when it might hold unpushed commits.

rm -r on a mounted drive or a folder at its top level (/Volumes, /media, WSL’s /mnt/c) now gets the same safety prompt as rm -rf /Applications. Bash and PowerShell no longer delete a large command’s output file when it can’t be copied to the session’s tool-results folder, unless the disk is full. And CLAUDE_CODE_TRANSCRIPT_LOCAL_GC no longer drops messages from the saved transcript when the disk fills up during a trim.

Headless runs get two fixes. A plugin can no longer keep a run going past --max-turns, Stop or ended input by spawning subagents or re-running a finished one. And when an Agent SDK callback hook on the same tool call times out, a PreToolUse hook’s deny reason is no longer replaced by a timeout error. In agent teams, approving a shutdown request from the main session no longer exits the whole CLI.

Gateways, auto mode and variables

Behind a custom ANTHROPIC_BASE_URL, tool search is now on by default, and if the gateway answers 400 or 422 the request is retried without it. Another gateway fix covers context_management: Extra inputs are not permitted errors: Claude Code now resends the request 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 runs on Bedrock, Vertex, Foundry, the Claude apps gateway and telemetry-disabled sessions. Anthropic describes auto mode as handing approvals to model-based classifiers, with a transcript classifier checking each action before it runs. In this release that classifier’s context is no longer stored with every request, which keeps session files smaller.

Setting CLAUDE_CODE_AUTO_COMPACT_WINDOW=200k used to give you a 100K window without any message. The variable now takes k and M suffixes like --autocompact and warns when a value is out of range or ignored.

Mods, skills and admin tools

A mod’s tool.check answer can now set decider: "person". Then only the permission dialog or a host’s callback can approve the call, and where nobody can be asked, it is refused with the mod’s reason. The event also gains e.isReadOnly for read-only calls. settings.read hooks now receive each settings layer and can rewrite the merged result. A managed mod can use this to make an organization’s setting a ceiling, including the cleanupPeriodDays value the retention sweep uses.

The skills from one source (a repo, your own folder or a plugin) can now register at most 1,024 hooks and 16,384 matcher characters per session. After compaction, Claude gets the skill list again, and /reload-skills now sends only new or changed skills.

In Code Review, owners can set the organization’s review level to Quick, Standard (the default) or Deep and give individual repositories their own level. A new admin option reviews every repository in a GitHub organization, including ones added later. Pull requests opened within a minute or two of an admin turning on Code Review used to be skipped silently; now they are retried and reviewed. /claude-api managed-agents-secure compares a Managed Agents agent’s settings with Anthropic’s published security guide and changes nothing.

Our analysis

What we checked

On October 20 we searched the Linux x64 build of 2.1.304 for the code behind several release-note lines. We also ran its auto-compact parser, extracted verbatim, on sample values, with one helper function replaced by our own stub.

How we check stories

The release notes describe the resume warning’s trigger only as “a noticeable share” of the 5-hour limit. The code sets the default at 5% and shows the user the estimate. All the other items we traced matched the notes, but three of them come with conditions that matter when you configure a gateway, the compaction window or skill hooks.

  • When a gateway refuses a request with tool search (400 or 422), Claude Code records the refusal for that base URL and model and keeps tool search off there for 24 hours. ENABLE_TOOL_SEARCH=false skips the refused request; =true always sends tool search and turns the recovery off. Responses of type billing_error are not retried this way.
  • CLAUDE_CODE_AUTO_COMPACT_WINDOW accepts 100k to 1M tokens, and a bare number counts as tokens. So =200 falls below the minimum and is clamped to 100k with a warning, while --autocompact 200 means 200k. 2M and 1.5M are clamped to 1M, 99k to 100k, and non-numeric values are ignored.
  • Toward the hook cap, a matcher’s characters count once for each hook it applies to, and a single matcher is limited to 2,048 characters. A skill that would push its source past either bound registers none of its hooks and gets no tools, and Claude Code logs a warning.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.