Claude Code 2.1.311 compacts past 200K instead of stopping

Claude Code 2.1.311, published on October 26 in Anthropic’s GitHub release notes, keeps a standard-context session going when a request runs past 200K tokens: it compacts the conversation and continues. Before, the session stopped with “Usage credits required for 1M context”, so updating fixes long sessions without 1M-context credits that kept dying at that message.
What compaction does now
Compaction replaces the conversation with a summary the model writes, so a session that carries on past 200K works from that summary from then on. Two other changes in the release touch that step. When the model’s reply has no summary in it, Claude Code now usually asks for the summary once more before it replaces the conversation. And Claude stops seeing stale MEMORY.md and CLAUDE.md content right after automatic compaction when those files were edited earlier in the session.
Cloud sessions get a warning about the same trade-off: /teleport and claude --teleport now say when a compacted cloud session loads from its last compaction, because the messages it summarized aren’t in the local copy.
If you set DISABLE_COMPACT, it is honoured in more places. Agent teammates stopped compacting their history when it is set, and the rewind menu stopped offering “Summarize from here” and “Summarize up to here”. Set in a settings file or in a mod’s $.env.set, the variable can now only turn compaction off, never back on. Separately, a CLAUDE.md file with a very long list item caused long freezes at startup and after reading or editing files; that is fixed too.
Defaults that changed
In the interactive terminal, ultrathink now runs its turn at xhigh effort on Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1 through Anthropic’s API. Typed while Claude is working, it raises the rest of that turn. The rainbow highlight now appears only where the keyword can raise effort, and not when the word is quoted or sits inside a file path. /code-review now tells Claude to put the effort level first and use max only when asked.
Effort and cache costs are easier to see as well. /effort warns about a prompt cache miss in plan mode when the plan model differs from the session model, and /usage lists large prompt-cache misses under “What’s contributing to your limits usage?”, which it never did before.
Scripts that read --output-format json or stream-json will see DEL, C1 control and Unicode format characters inside strings written as \uXXXX escapes. Parsed values are unchanged.
The VS Code extension now starts sessions with DISABLE_TELEMETRY set while VS Code’s own telemetry setting is off, and those sessions send no usage metrics or error reports and fetch no feature flags. Model names and IDs drop the [1m] suffix and its label on models where it has no effect, though the suffix is still accepted.
Fewer stuck turns
Claude Code was retrying requests the API had marked not to retry, which could hold a turn for minutes, or indefinitely in unattended retry mode (CLAUDE_CODE_RETRY_WATCHDOG). Unattended retry already got a cap on waiting out distant usage limits in 2.1.301 in October; this fix closes a separate way for the same mode to sit forever.
Interrupting Claude no longer waits for a timeout to take effect while an MCP server hasn’t answered a resource read or a skill is still downloading. Write and Edit stopped stalling for up to 5 seconds, and reporting 0 lines changed, after changing thousands of lines in a file. A shell command that reaches its timeout now returns the output so far and says the command is still running in the background. In Cowork cloud sessions, WebFetch and WebSearch hung on a stalled response; an unfinished request now fails after 300 seconds.
Subagents, SDK and the self-hosted runner
Subagents can now use MCP tools from servers that finish connecting after the subagent starts. SubagentStop hooks were firing about twice a minute for each running subagent; they now run once, when it finishes. A subagent’s isolated worktree is also kept while a background subagent it started is still working in it.
For headless use, claude -p and SDK sessions had been saving transcript messages out of order or keeping messages that were taken back. Both are fixed.
The self-hosted runner gains --hold-idle-file and --max-hold-min, which keep an idle session alive while your host reports processes the session left running. A runner session that hit a rate limit on an added read-only repository (HTTP 429, or a git wrapper that exits 75) used to fail to start; it now starts without that repository.
On Bedrock, Vertex and Foundry
Long hidden thinking is no longer cut off as idle on Google Vertex AI, Microsoft Foundry and Claude Platform on AWS, where the endpoint sends thinking progress updates. The clearer “Connection dropped” error, which now points first to the proxy or gateway in use and then to VPN or firewall, applies to the Anthropic API only; Bedrock, Vertex and Foundry keep the old message.
Claude Code on Bedrock, Mantle, Vertex and Foundry now loads model settings from a signed file on downloads.claude.ai. Setting CLAUDE_CODE_MODEL_CATALOG=off turns that off.
Up next
Anthropicanalysis
Over 80% of Anthropic’s Q3 revenue came from new models
Anthropic’s S-1 shows models released in the six months to September 30 made more than 80% of Q3 revenue, though not how many customers switched. Is your default the newest Claude model or a cheaper one?
Related stories
- Claude Code 2.1.310 brings Monitor to Bedrock and Vertex
- Claude Code 2.1.307 moves API code to version 2026-10-21
- Claude Code 2.1.305 repairs requests on Vertex and Bedrock
- Claude Code 2.1.301 stops waiting out distant usage limits
- Claude Code 2.1.300 splits cache writes by lifetime in OTel
- Claude Code 2.1.299 compacts idle chats before cache expiry
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

