← AUTOMATER NEWSROOM

Claude Code 2.1.296 Unifies Gateway Policy Across Desktop and CLI, Adds Auto-Compact Window for Subagents

v2.1.296 ships a `code` key in the Claude apps gateway's managed.policies[] that applies the same policy to Claude Desktop's Code tab and the CLI, plus autoCompactWindow and a workflow-subagent model pin for subagent fleets.

A diagram with one managed policy card at center showing the new code key and an existing cli key, with arrows from the policy to a Claude Desktop Code tab card on the left and a Terminal CLI card on the right; a separate amber panel underneath shows autoCompactWindow as a per-subagent compaction knob.A diagram with one managed policy card at center showing the new code key and an existing cli key, with arrows from the policy to a Claude Desktop Code tab card on the left and a Terminal CLI card on the right; a separate amber panel underneath shows autoCompactWindow as a per-subagent compaction knob.
Original Automater illustration. Central idea: the v2.1.296 release applies one managed apps-gateway policy to both the Claude Desktop Code tab and the terminal CLI, and lets subagents configure their own compaction window independently of the parent conversation.

Claude Code 2.1.296 shipped on October 9, 2026, with two fleet-relevant capabilities that change how operators configure the same managed policy across the Claude Desktop “Code” tab and the terminal CLI, and how long-lived subagents manage their own context window.

v2.1.296 is the latest in a string of seven consecutive Claude Code releases since October 5, following 2.1.295’s terminal-status protocol and onFailure-block hooks, and 2.1.294’s tightened prompt-hook judgment. The release lands a single coherent change in gateway policy: the Claude apps gateway’s managed.policies[] now accepts a code key whose body is the same as cli and which is applied to Claude Desktop’s Code tab. Beside desktop, the code key also turns on Claude Desktop’s gateway mode, so a fleet admin can publish one rule that governs both the CLI and the in-app Code surface.

For teams running Claude Code under a managed apps gateway, this collapses the desktop/CLI gateway-policy split. Before 2.1.296, a managed policy typically had to declare cli for terminal sessions and desktop for the in-app Code surface; the new code key lets a managed policy ship one object and have the gateway apply it on both sides, with desktop continuing to control the rest of the Claude Desktop app and the new code key controlling only the in-app Code tab.

The second headline change is subagent context control. v2.1.296 adds autoCompactWindow to subagent frontmatter and to --agents definitions. A subagent can now request an auto-compact threshold earlier than the main conversation’s window — useful when a subagent is doing long-running retrieval or refactor work and the parent conversation has plenty of headroom but the subagent itself is running close to its own context ceiling. The release also adds CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL, a single environment variable that pins every workflow agent to one model while other subagents keep their own. Operators running multi-lane agent fleets (see our subagent orchestration field guide) can now enforce one model across the workflow lane without rewriting each subagent’s frontmatter.

The wider fleet significance: the gateway policy surface that operators maintain now treats the in-app Code tab the same as the CLI, and a single environment variable can pin model routing for every workflow agent. The changes run through the agent gateway as the control plane we keep writing about, and they are the kind of compaction policy edits that belong in a managed lane the agent owns, not a desktop override.

Other changes worth surfacing

  • CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS — sets an upper bound on the 529 backoff, complementing CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS from 2.1.292. Together they tune the backoff envelope without code changes.
  • allow_large on the Read tool — lets one Read call return a text file past the usual size limits when context has room.
  • Managed PreToolUse/prompt-hook fix — a managed PreToolUse hook denying a tool call with "continue": false, or a managed prompt hook blocking one, was refusing the call but not ending the turn. The fix now ends the turn.
  • Gateway sign-in regression fix — a saved gateway sign-in was being ignored on machines whose managed settings set forceLoginMethod to gateway with no forceLoginGatewayUrl (regression introduced in 2.1.295); now fixed.
  • Bash permission tightening — commands that assign BASH_ARGV0 and then use it no longer auto-approve; they now prompt.
  • Edit/NotebookEdit non-UTF-8 refusal — edits to files encoded in Windows-1252, Shift-JIS or GBK were silently rewriting non-ASCII characters; such edits are now refused outright.
  • Sonnet 5.5 cache-read price cut — /cost, the status line, --max-budget-usd, and the SDK’s cost figures now price Sonnet 5.5 cache reads at $0.10/Mtok, down from $0.20. The model is unchanged; the change is in the cost reporting.

Why this release matters now

The two headline items address configuration patterns that the release notes themselves describe. The new code key closes a long-standing gap where a managed policy that governed the CLI did not, by itself, govern the in-app Code tab. The autoCompactWindow knob lets a subagent compact before the main conversation would, which matters when a subagent is the part of a fleet most likely to hit its own context ceiling mid-task. v2.1.296 ships both, in code, without an opt-in flag.

For upgrade sequencing, follow the canary-every-CLI-upgrade rule: pin 2.1.296 on one fleet lane, watch the gateway’s policy apply side (both the CLI side and the in-app Code tab), and only roll forward when the subagent autoCompactWindow thresholds behave the way your workflow expects. The release itself was published at 19:28 UTC on October 9, with the changelog updated within the hour, so the publisher window is fresh.

The GitHub release page for v2.1.296 — pointing at commit 2301018, showing the merged “What’s changed” list, the 13 assets, and the release metadata, with 56 fixes plus a longer list of improvements — is captured below.

GitHub release page for anthropics/claude-code v2.1.296, captured October 9, 2026, showing the merged What's changed entries for the gateway code key, subagent autoCompactWindow, CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL, and the 56 fixes plus improvements shipped in the release.
GitHub release page for anthropics/claude-code v2.1.296, captured October 9, 2026, showing the merged What's changed entries (gateway code key, subagent autoCompactWindow, CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL, and the 56 fixes plus improvements) and the 13 release assets. · Original source

Sources

Sources

  1. Release v2.1.296 · anthropics/claude-code · GitHub
  2. Releases · anthropics/claude-code · GitHub
  3. Claude Code 2.1.296 Unifies Gateway Policy Across Desktop and CLI, Adds Auto-Compact Window for Subagents
  4. Overview - Claude Code Docs