What changed
Claude Code 2.1.212 shipped on July 17, 2026. New per-session limits stop search and delegation from looping without bound, and /fork now copies your whole conversation into a background session instead of launching an in-session subagent. Long-running MCP calls move to the background so the session stays usable, and a large batch of fixes lands for plan mode permission bypasses, dropped hook halts, and session-resume regressions.
New features
-
Session-wide limit on WebSearch tool calls (default 200)
When an agent got stuck in a search loop, WebSearch calls could pile up without bound in a single session. There is now a session-wide limit on WebSearch tool calls (default 200) to stop runaway search loops, tunable via
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION. -
Per-session cap on subagent spawns (default 200)
Subagents delegating to more subagents could spawn without bound in a single session. There is now a per-session cap on subagent spawns (default 200) to stop runaway delegation loops; override with
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION, and/clearresets the budget. -
MCP tool calls auto-move to the background after 2 minutes
Calling a slow MCP tool blocked the whole session while it waited. MCP tool calls running longer than 2 minutes now move to the background automatically so the session stays usable; configure the threshold or disable with
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS. -
/forkcopies your conversation into a background session/forkused to launch an in-session subagent, making it hard to keep working while managing the fork separately. It now copies your conversation into a new background session — its own row inclaude agents— while you keep working. The in-session subagent it used to launch is now/subtask. -
claude auto-mode resetThere was no standard way to restore auto-mode to its defaults once its configuration drifted.
claude auto-mode resetrestores the default auto-mode configuration, with a confirmation prompt (pass--yesto skip). -
/resumepicker in the agent viewReopening a past session from the agent view meant hunting it down yourself. Typing
/resumein the agent view now opens a picker of past sessions — including sessions deleted from the list — and resumes your pick as a background session.
Key improvements
-
Prompt caching now works behind LLM gateways and custom base URLs
The mid-conversation system block wasn’t cached behind gateways or custom base URLs. It now works behind LLM gateways and custom base URLs (Bedrock, Vertex, 1P).
-
Reduced token usage in inter-agent messaging
SendMessagebodies were duplicated into replayed history and tool results, wasting tokens. They are no longer duplicated. -
Faster background agent cold-attach
Cold-attaching to a background agent left you staring at a blank wait while the session booted. It now instantly shows the formatted transcript while the session boots.
-
More reliable web search and web fetch
Transient 529 errors and rate-limited requests made web search and fetch fail outright. They are now retried with bounded backoff.
-
Mid-turn model switching in headless/SDK sessions
Changing the model in a headless/SDK session only took effect on the next turn. A
set_modelcontrol request now applies mid-turn, so the next model round-trip uses the new model instead of waiting for the next turn. -
“Needs input” status in the agent view
Sessions waiting on a sandbox, MCP-input, or managed-settings prompt showed as “Working,” hiding what they were blocked on. The agent view and
claude agents --jsonnow show these as “Needs input” instead. -
Reasoning effort recorded in session transcripts
Transcripts didn’t record which reasoning effort level produced each assistant message. Session transcripts now record the reasoning effort level on each assistant message.
Bug fixes
Permissions and plan mode
- Fixed plan mode auto-running file-modifying Bash commands (e.g.
touch,rm) without a permission prompt or SDKcanUseToolcallback. - Fixed worktree creation following a repository-committed symlink at
.claude/worktrees, which could create files outside the repository.
Hooks and tool execution
- Fixed a
continue:falsehook’s halt being dropped when the tool fails or completes mid-stream, and hook infrastructure errors being misreported as user rejections. - Fixed SIGTERM during a running Bash tool orphaning the command’s process tree in print/SDK mode — the CLI now aborts the turn, kills the tree, and exits 143.
Session resume and background sessions
- Fixed a spurious “File has not been read yet” error when editing a file that had been read with offset/limit before resuming a session.
- Fixed
ExitWorktreefailing with “no active EnterWorktree session” after resuming a session with--continue/--resumein print/SDK mode. - Fixed streaming-mode control requests being marked complete before their handler finished, which could lose the request on session restart.
- Fixed background sessions created with
/forklosing their live-parent protection after a state write failure. - Fixed reopening a stopped background session from the agent view failing silently — it now resumes the session, or shows why it can’t and lets you force a restart.
- Fixed the workflow agent grid staying empty for Remote Control clients that join a session mid-run.
- Fixed agent teams: a stopping teammate could send the leader duplicate idle notifications when team initialization re-ran within a session.
/ultrareview
- Fixed
/ultrareviewrejecting PR references like#123,PR 123, and pasted PR URLs; error hints now name the command you actually typed. - Fixed
/ultrareview <branch>not fetching the branch from origin when it exists remotely; it now suggests the closest branch name on typos. - Fixed
/ultrareviewskipping the billing confirmation in a new conversation after/clear. - Fixed
/ultrareview’s “not a git repository” error on Claude Desktop now suggesting the project’s repository folder instead of terminal commands.
Network and telemetry
- Fixed OpenTelemetry HTTP exports being rejected with 411/400 by Azure Monitor and other endpoints that don’t accept chunked transfer encoding.
- Fixed OTLP event log records missing
trace_id/span_idwhenTRACEPARENTis set in SDK/headless mode. - Fixed conversations with many images incorrectly failing with “Request too large” errors, and improved the error message to explain the actual cause.
- Fixed web search and web fetch returning “API Error” text as search results or page content when the API was overloaded.
- Fixed hosted (host-managed) sessions failing at startup when repository settings configured mTLS certs, extra CA bundles, or OAuth scopes; these transport settings are now ignored with a warning.
Terminal and platform
- Fixed
/backgroundandclaude --bgfailing with “EUNKNOWN: unknown error, uv_spawn” on Windows when Group Policy blocks PowerShell 5.1; the daemon now prefers PowerShell 7. - Fixed shell mode (
!) not executing commands containing file paths while the path autocomplete popup was open. - Fixed auto-mode denial notifications rendering broken characters when a long denial reason was truncated mid-emoji.
- Fixed Ctrl+J not inserting a newline in the agent view dispatch input on terminals with extended key reporting, and surfaced the newline shortcut in the
?help overlay. - Fixed the plan-approval dialog footer splitting “ctrl+g to edit in ” apart when the file path is long.
- Fixed the welcome banner keeping its old panel widths after a combined width+height terminal resize in fullscreen mode.
- Fixed diff previews losing their line numbers and +/- markers in narrow layouts.
Other
- Fixed @-mentions attaching nothing after a partial file read, plugin uninstall targeting the wrong marketplace, and false “Command timed out” on exit code 143.
Notes
- New per-session limits — web searches cap at 200 and subagent spawns cap at 200 by default. Large automated workflows may hit these caps, so tune them with
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSIONandCLAUDE_CODE_MAX_SUBAGENTS_PER_SESSIONif needed;/clearresets the subagent budget. /forkbehavior change and new/subtask—/forknow copies your conversation into a background session. Use/subtaskif you want the previous in-session subagent behavior.- Task tool
modeparameter deprecated — it is now ignored, and subagents inherit the parent session’s permission mode by default. - Enterprise
forceLoginMethodnow enforced more broadly — it applies to VS Code extension, SDK,setup-token, andinstall-github-applogins, not just the terminal. - Correction to the 2.1.200 release note — tmux through the 3.6 series lacks synchronized output; newer tmux with support is detected automatically.