Claude Code v2.1.311 Fixes Startup Freezes, Long-Line Edits, and Context Overflow Halts

✍️ OpenClawRadar📅 Published: October 27, 2026🔗 Source
Ad

Claude Code v2.1.311 landed with two new self-hosted-runner flags and a stack of bug fixes that hit real developer pain points — startup freezes, context overflow, and edits on large files.

New Flags for self-hosted-runner

The release adds --hold-idle-file and --max-hold-min to self-hosted-runner. These keep an idle session alive while your host reports processes it left running — useful when a spawned process outlives the agent turn.

Context Overflow Now Compacts Instead of Stopping

Standard-context sessions used to halt with Usage credits required for 1M context once a request crossed 200K tokens. In v2.1.311, Claude Code compacts the conversation and continues. No more dead session from a long read or edit.

Startup and File-Edit Freezes

  • Long freezes at startup and after reading/editing files when a CLAUDE.md file holds a very long list item.
  • Write and Edit stalling up to 5 seconds after completing, and reporting 0 lines changed, when editing thousands of lines.
  • Interrupts not taking effect until timeout while an MCP server hadn't answered a resource read or a skill was still downloading.

Subagent and MCP Fixes

  • Subagents can now use MCP tools from servers that finish connecting after the subagent starts.
  • Claude no longer sees stale MEMORY.md and CLAUDE.md content right after automatic compaction when those files were edited earlier in the session.
  • SubagentStop hooks now fire once on finish instead of roughly twice a minute per running subagent.
  • A subagent's isolated worktree is no longer removed while a background subagent it started is still working in it.

Session and CLI Fixes

  • claude -p and SDK sessions no longer save transcript messages out of order or keep retracted messages.
  • claude mcp add, claude mcp remove, and /mcp now name the project entry in ~/.claude.json rather than the current folder when run below a repo root.
  • claude mcp list and claude mcp get no longer duplicate error codes (ENOENT: ENOENT:).
  • claude respawn <id> no longer starts the background service before reporting that no session matches the id.
  • The "background service did not respond" error now suggests claude daemon stop --any instead of the disabled claude daemon restart.
Ad

Cloud and Remote Control Fixes

  • Remote Control sessions no longer hang on "Connecting" for ~2 minutes when a proxy blocks a startup request.
  • Messages Claude sends to a cloud or Remote Control session no longer appear as your own in the mobile apps.
  • Claude is now told the cause when an attachment fails to save (e.g., disk full) or when attachments past the first 20 are dropped.
  • WebFetch and WebSearch in Cowork cloud sessions now fail after 300 seconds on a stalled response instead of hanging.
  • Cowork cloud sessions now ignore the agent setting so connectors and tools survive restarts.

UI and Tool Details

  • The @ file picker now respects .ignore/.rgignore negation rules that re-include git-ignored files.
  • The Bash tool description no longer claims the working directory always persists between calls.
  • The environment block no longer names a shell that commands don't run in (e.g., fish when Bash uses zsh).
  • Agent team sessions show the task list again on --resume, --continue, /resume, or --session-id, including after /clear or a crash.
  • Pasting text that mentions an image path (e.g., ! open /tmp/shot.png) no longer attaches the image and drops the path from the prompt.

If you use Claude Code daily, this release is worth pulling — especially if you've hit the 200K-token stop or the Write/Edit stall on large files.

📖 Read the full source: GitHub Claude-Code

Ad

👀 See Also