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
- 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".
- 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.
- 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.
- 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.
- 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 costPaste 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
- 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".
- 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.
- 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.
- 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.
- 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
- Restate the change in one sentence.
- Propose a minimal plan for my repo (or a throwaway pilot).
- Implement only what I approve; prefer small diffs and tests.
- Call out risks (permissions, breaking APIs, cost).
Start by confirming you understood the proposal.
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.