Skip to content
Proposals/Upgrade Claude Code to v2.1.311 so 200K-token se
proposaleveryoneP5High impactClaude Code

Upgrade Claude Code to v2.1.311 so 200K-token sessions compact instead of demanding 1M credits

v2.1.311 makes standard-context sessions compact and continue past 200K tokens instead of demanding 1M credits, adds self-hosted-runner --hold-idle-file and --max-hold-min, and fixes CLAUDE.md freezes, MCP interrupt delays, SubagentStop double-fires, and stale MEMORY.md after compaction.

Why this loop

This release is mostly reliability, but several fixes change how you should run Claude Code. Standard-context sessions no longer abort with "Usage credits required for 1M context" when a request exceeds 200K tokens; Claude Code now compacts and continues, so do not switch to 1M context just to survive long chats. Self-hosted runners can stay idle while leftover host processes are still reported, via --hold-idle-file and --max-hold-min. CLAUDE.md files with a very long list item no longer freeze startup or Read/Edit. Interrupts now take effect while an MCP resource read is unanswered or a skill is still downloading. SubagentStop hooks fire once when a subagent finishes, not about twice a minute while it runs—remove debounce workarounds. After automatic compaction, Claude no longer sees stale MEMORY.md/CLAUDE.md if you edited them earlier in the session. Background-service errors now tell you to run claude daemon stop --any, which ends background sessions. DISABLE_COMPACT is honored by agent teammates and rewind no longer offers summarize-from/up-to-here. Do not infer the omitted 38 changes.

Proposed actions

  1. Upgrade Claude Code to v2.1.311, then stay on standard context: sessions that exceed 200K tokens now compact and continue instead of stopping with "Usage credits required for 1M context".
  2. Start self-hosted runners with --hold-idle-file <file> and --max-hold-min <minutes> so an idle session stays up while the host still reports processes the runner left running.
  3. In every SubagentStop hook, remove debounce or ignore-duplicate logic added because the hook fired ~twice a minute per running subagent; v2.1.311 runs it once when the subagent finishes.
  4. When you see "background service did not respond", run: claude daemon stop --any (do not use the disabled claude daemon restart). Then resume with --resume, --continue, or --session-id.
  5. If DISABLE_COMPACT is set, keep it: agent teammates no longer compact anyway, and the rewind menu no longer offers "Summarize from here" or "Summarize up to here".

Agent prompt

Paste into your agent or query via MCP (get_agent_prompt) — free, no extra AI cost

Paste into Claude Code / CLAUDE.md task

DevAgentRadar → Claude Code

You are helping me adopt a real coding-assistant change. Work only from the facts below. Do not invent features.

Context

Assistant: Claude Code Proposal: Upgrade Claude Code to v2.1.311 so 200K-token sessions compact instead of demanding 1M credits Summary: v2.1.311 makes standard-context sessions compact and continue past 200K tokens instead of demanding 1M credits, adds self-hosted-runner --hold-idle-file and --max-hold-min, and fixes CLAUDE.md freezes, MCP interrupt delays, SubagentStop double-fires, and stale MEMORY.md after compaction. Primary source: https://github.com/anthropics/claude-code/releases/tag/v2.1.311

Why it matters

This release is mostly reliability, but several fixes change how you should run Claude Code. Standard-context sessions no longer abort with "Usage credits required for 1M context" when a request exceeds 200K tokens; Claude Code now compacts and continues, so do not switch to 1M context just to survive long chats. Self-hosted runners can stay idle while leftover host processes are still reported, via --hold-idle-file and --max-hold-min. CLAUDE.md files with a very long list item no longer freeze startup or Read/Edit. Interrupts now take effect while an MCP resource read is unanswered or a skill is still downloading. SubagentStop hooks fire once when a subagent finishes, not about twice a minute while it runs—remove debounce workarounds. After automatic compaction, Claude no longer sees stale MEMORY.md/CLAUDE.md if you edited them earlier in the session. Background-service errors now tell you to run claude daemon stop --any, which ends background sessions. DISABLE_COMPACT is honored by agent teammates and rewind no longer offers summarize-from/up-to-here. Do not infer the omitted 38 changes.

Suggested actions

  1. Upgrade Claude Code to v2.1.311, then stay on standard context: sessions that exceed 200K tokens now compact and continue instead of stopping with "Usage credits required for 1M context".
  2. Start self-hosted runners with --hold-idle-file <file> and --max-hold-min <minutes> so an idle session stays up while the host still reports processes the runner left running.
  3. In every SubagentStop hook, remove debounce or ignore-duplicate logic added because the hook fired ~twice a minute per running subagent; v2.1.311 runs it once when the subagent finishes.
  4. When you see "background service did not respond", run: claude daemon stop --any (do not use the disabled claude daemon restart). Then resume with --resume, --continue, or --session-id.
  5. If DISABLE_COMPACT is set, keep it: agent teammates no longer compact anyway, and the rewind menu no longer offers "Summarize from here" or "Summarize up to here".

Config surfaces this release may change

  • context and compaction settings (high confidence) — check your repo before applying
  • MCP servers (high confidence) — check your repo before applying
  • skills (high confidence) — check your repo before applying
  • agent context files — check your repo before applying
  • hooks — check your repo before applying
  • subagent definitions — check your repo before applying
  • background and headless runs — check your repo before applying
  • settings files — check your repo before applying
  • permission rules — check your repo before applying
  • sandbox settings — check your repo before applying

After you finish

Do not report this as applied to DevAgentRadar. You cannot write the visitor's loop.

Tell the human: open https://devagentradar.com/proposals/claude-code-v2-1-311-upgrade-claude-code-to-v2-1-311-so-200k-token-sessi and mark Applied, Skipped, or Failed. Proposal id: 59b66788-39a1-489b-87fd-32e8697ab6b3

Your job

  1. Restate the change in one sentence.
  2. Propose a minimal plan for my repo (or a throwaway pilot).
  3. Implement only what I approve; prefer small diffs and tests.
  4. Call out risks (permissions, breaking APIs, cost).

Start by confirming you understood the proposal.

agentmcpmodelpricingsecurityRelease source ↗

Your loop

This browser · no sign-in · not shared as “you”

After you run the prompt

Only you can mark this. Agents cannot write your loop.

Your decision stays on this device. A public tally appears after a few votes.

Originating release signal

Claude Codev2.1.311Oct 26, 2026

v2.1.311

Added --hold-idle-file and --max-hold-min to self-hosted-runner, to keep an idle session while your host reports processes it left running · Added a tip for the Explanatory output style, shown when you ask Claude for explanations · Fixed long freezes at startup and after reading or editing files when a CLAUDE.md file holds a very long list item · Fixed interrupting Claude not taking effect until a timeout while an MCP server had not answered a resource read or a skill was still downloading · +95 more changes
Verified excerpt — the source's own words

What's changed

  • Added --hold-idle-file and --max-hold-min to self-hosted-runner, to keep an idle session while your host reports processes it left running
  • Added a tip for the Explanatory output style, shown when you ask Claude for explanations
  • Fixed long freezes at startup and after reading or editing files when a CLAUDE.md file holds a very long list item
  • Fixed interrupting Claude not taking effect until a timeout while an MCP server had not answered a resource read or a skill was still downloading
  • Fixed standard-context sessions stopping with "Usage credits required for 1M context" when a request ran over 200K tokens; Claude Code now compacts the conversation and continues
  • Fixed Write and Edit stalling for up to 5 seconds after they ran, and reporting 0 lines changed, when changing thousands of lines in a file
  • Fixed subagents being unable to use MCP tools from servers that finish connecting after the subagent starts
  • Fixed Claude seeing stale MEMORY.md and CLAUDE.md content right after automatic compaction when those files were edited earlier in the session

Excerpt ends here — this release continues at the source ↗.

Primary source ↗