Claude Code v2.1.212 — 11 New Environment Variables: Session Budget Caps and a Silent /bug Command#
Published on July 17, 2026
Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog
Claude Code v2.1.212 adds eleven environment variables over the last analyzed build, v2.1.210 — the headline additions are two per-session budget caps that stop runaway subagent and web-search loops, a /bug command wired to a first-party feedback relay the changelog never names, and a Windows-only sandbox gate.[1] Six of the eleven first ship in this build (npm publish 2026-07-16); the other five landed in the interim v2.1.211.
What Changed#
| v2.1.210 | v2.1.212 | |
|---|---|---|
| Environment variables | 519 | 526 (+11) |
| Model IDs | 17 | 17 |
| New server-side gates | — | tengu_nankeen_kestrel, tengu_juniper_relay |
| Slash commands | 24 | 25 (+ /bug) |
New Environment Variables#
| Variable | Likely Purpose |
|---|---|
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION | Per-session ceiling on subagent spawns (default 200). When the cap is hit, the binary injects a prompt — "Subagent spawn limit reached. Complete the remaining work directly with your tools instead of spawning more agents. If more agents are genuinely needed, ask the user to raise CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION" — next to a subagent_count_cap counter. The changelog confirms the default and that /clear resets the budget. |
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION | Per-session ceiling on WebSearch tool calls (default 200), gated by a web_search_session_cap. Its exhaustion string tells the model "this session has used its web search budget… Continue with the information already gathered instead of issuing more searches" and names the variable as the override. It sits directly beside the subagent cap in the binary — the same runaway-loop guardrail applied to search. |
CLAUDE_CODE_SEND_FEEDBACK | Kill switch for the new /bug feedback relay. The gate function bails if DISABLE_FEEDBACK_COMMAND or DISABLE_BUG_COMMAND is set, requires an allow_product_feedback capability and a firstParty account, then honors this variable: setting it to false disables sending, otherwise the path falls through to the server gate tengu_juniper_relay. A companion draft function defaults its report type to "bug". Absent from the release changelog. |
CLAUDE_CODE_NANKEEN_KESTREL | Windows-only sandbox gate. The gate function returns false on any non-Windows OS, true if this variable is set, otherwise defers to the server gate tengu_nankeen_kestrel (default off). It sits next to a "Windows sandbox needs a one-time install" remedy string, and follows Anthropic's bird-codename convention for staged features (PEWTER_OWL, LANTERN_PRISM). Undocumented. |
CLAUDE_CODE_MEMORY_PUSH_DELETE_MODE | Controls how deletions propagate when memory is pushed upstream — a delete-mode knob for the memory subsystem that gained account- and organization-scoped sync in v2.1.210 (CLAUDE_CODE_DISABLE_ORG_MEMORY, gate tengu_haze_glass). With org memory now writing to shared stores, this governs whether a local deletion removes the shared entry or is held back. No changelog mention. |
CLAUDE_CODE_RESUME_SOURCE_ALIVECLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS | Two knobs for a resume subsystem being rebuilt around background sessions. _SOURCE_ALIVE signals whether a session's source is still live when resuming — the guard behind this release's fixes for reopening background sessions and the new /resume picker. _INTERRUPTED_TURN_MAX_AGE_MS caps how stale an interrupted turn may be before a background agent replays it, adding an age bound to the existing CLAUDE_CODE_RESUME_INTERRUPTED_TURN boolean. The first shipped in v2.1.212, the second in v2.1.211; neither is documented. |
CLAUDE_CODE_FORWARD_SUBAGENT_TEXT | Includes subagent text and thinking in stream-json output, paired with a new --forward-subagent-text flag. Shipped in v2.1.211 (npm 2026-07-15) and the one variable in this window the changelog names — aimed at SDK and automation consumers that need visibility into delegated work. |
CLAUDE_CODE_ENABLE_REFRESH_MCP_TOOLS | Enables an on-demand MCP-tool refresh capability, grouped with CLAUDE_CODE_ENABLE_TASKS and CLAUDE_CODE_ENABLE_REMOTE_RECAP. It lets a session re-fetch an MCP server's tool list at runtime rather than only at connect — the mechanism behind the release's plugin-MCP reconnect-after-idle fix. Shipped v2.1.211, undocumented. |
CLAUDE_WORKFLOW_NAME_ONLY | Restricts a remote/headless run to a single named workflow. It appears immediately after CLAUDE_REMOTE_WORKFLOW_SCRIPT and CLAUDE_REMOTE_WORKFLOW_ARGS in the workflow-execution env set — an allowlist knob for the remote workflow runner rather than a free-form script path. |
CLAUDE_CODE_GB_DISK_CACHE_WHEN_TELEMETRY_OFF | Opts GrowthBook (GB) flag data back into the on-disk cache under a telemetry-off profile, where feature-flag caching would otherwise be skipped. Shipped v2.1.211, undocumented — a reliability knob for flag evaluation in privacy-restricted deployments. |
Where the Changelog Confirms It#
The reverse-engineered signal and the official notes agree on one theme this release: containing long autonomous sessions. The changelog states both caps outright — a WebSearch limit "to stop runaway search loops" and a subagent-spawn cap "to stop runaway delegation loops," each defaulting to 200 and resettable with /clear — which is exactly what the binary's subagent_count_cap and web_search_session_cap strings encode. The same notes rework /fork to copy the conversation into a background session with its own claude agents row, rename the old in-session subagent to /subtask, deprecate the Task tool's mode parameter (subagents now inherit the parent's permission mode), and cut token usage by no longer duplicating SendMessage bodies into replayed history. Read against the two caps, this is a coherent push: delegation is getting cheaper and more observable, and the budget ceilings are the containment layer under it.
Two documented fixes are worth flagging on their own. Plan mode no longer auto-runs file-modifying Bash commands like touch and rm without a permission prompt or SDK canUseTool callback — a real permission-bypass closed. And worktree creation no longer follows a repository-committed symlink at .claude/worktrees, which could otherwise write files outside the repo. Both are the kind of quiet correctness work that rarely makes a headline but changes what an untrusted repo can do to your machine.
The resume and MCP knobs also line up with named behavior. /resume in the agent view now opens a picker of past sessions — including ones deleted from the list — and resumes your pick as a background session; that is the surface behind CLAUDE_CODE_RESUME_SOURCE_ALIVE and the interrupted-turn age cap. MCP tool calls running longer than two minutes now move to the background automatically (tunable via CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS), the same subsystem CLAUDE_CODE_ENABLE_REFRESH_MCP_TOOLS extends by letting a session re-fetch an MCP server's tool list without reconnecting.
What These Tell Us#
The headline additions are guardrails, not features — the two 200-default caps sit at adjacent binary offsets and share one design: a prompt that tells the model to stop and the user how to raise the ceiling. They are the safety rail under agent teams and background /fork.
The silent /bug command is the more revealing find. It is a distinct command from the existing /feedback, with its own DISABLE_BUG_COMMAND switch, fenced behind a firstParty account check, an allow_product_feedback capability, and the server gate tengu_juniper_relay, and toggled by CLAUDE_CODE_SEND_FEEDBACK — none of it in a changelog that otherwise runs to forty-plus items. The Windows sandbox gate (CLAUDE_CODE_NANKEEN_KESTREL / tengu_nankeen_kestrel) is the same story: a bird-codenamed subsystem with a one-time-install remedy string, present and gated in the binary while the notes mention only the adjacent Windows /background PowerShell fixes. The pattern holds — the changelog names the caps and the fixes, but the feedback relay, the Windows sandbox, and the memory delete-mode all ship as wiring first, documentation later.
This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners. This content is not intended to infringe on any intellectual property rights, circumvent any protections, or encourage unauthorized access to proprietary systems.
Sources#
- Claude Code Official Changelog — v2.1.212 and v2.1.211 release notes
Related Versions#
- Claude Code v2.1.210 — Org Memory Sync and Session-Ref Propagation — account-scoped memory, remote session refs
- Claude Code v2.1.209 — Auto Mode Grows Up — two-model auto mode, Sonnet 5 permission classifier
- CLAUDE_CODE_EXPERIMENTAL_OBSERVER_AGENTS — The Undocumented Observer Agents Flag — background observer paired to an agent, shipped silently in v2.1.200
- Claude Code v2.1.143 — 27 New Env Vars, /goal, Agent View — supervised sessions, agent view, free model upgrade
- Claude Code v2.1.128 — Resume-Time Compact Prompt Disable Flag — lighter subagent system prompt