Claude Code v2.1.296: Gateway code Policies, Per-Subagent Auto-Compact Windows, and a Workflow Subagent Model Setting
Claude Code v2.1.296 adds a code key to Claude apps gateway policies, autoCompactWindow for subagents, CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL and a Read tool allow_large option, plus managed hook and Windows fixes.
Claude Code v2.1.296 has 79 changelog entries. It adds a code key to the Claude apps gateway’s managed.policies[], lets subagents set their own autoCompactWindow, and adds CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL, CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS and an allow_large option for the Read tool. Fixes cover managed-settings hooks, Claude apps gateway sign-in, backgrounding with ←, plugins and mods, and a set of Windows issues.
What’s New
code Policies for the Claude Apps Gateway
The Claude apps gateway’s managed.policies[] accepts a new code key. It carries the same settings as cli and also applies them in Claude Desktop’s Code tab; beside desktop, it turns on Claude Desktop’s gateway mode. When a Code tab session behind the gateway can’t start, including on a machine not set up for the gateway’s code settings, the reason now shows as a reply.
Per-Subagent autoCompactWindow
Subagent frontmatter and --agents definitions accept autoCompactWindow, so a subagent can auto-compact earlier than the main conversation’s window.
Workflow Subagent Model and Overload Retry Delay
CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL runs every workflow agent on one model while other subagents keep theirs. CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS sets a longer maximum delay for the backoff when retrying an overloaded (529) request.
allow_large for the Read Tool
The Read tool has a new allow_large option, so Claude can read a text file past the usual size limits in one call when it needs the whole file and the context has room.
Larger MCP Description Limit
The default limit on MCP tool descriptions sent up front and on MCP server instructions rises from 2,048 to 4,096 characters.
Sonnet 5.5 Cache-Read Pricing in Cost Figures
/cost, the status line, --max-budget-usd and the SDK’s cost figures now price Sonnet 5.5 cache reads at $0.10 per million tokens (was $0.20).
← Stops Work Started During the Move
A turn or ! command started while the session moves to the background is now stopped instead of finishing out of sight.
More Useful --debug Output
--debug now names unrecognized frontmatter fields in custom agent files, with a hint for likely typos. Command hooks on tool calls, prompts, SessionStart and Stop also log their command, plugin, outcome and duration when they finish, so a slow hook is identifiable.
VS Code: Claude in Chrome Asks Before Browser Actions
In VS Code, Claude in Chrome now asks before browser actions in every session, including one connected with @browser, as the terminal does. Allowing a site for the session stops repeat asks.
Claude Tag: Memory Files and Reply Footers
Members with the Claude Tag Admin permission can now create, edit and delete workspace and channel memory files on the Activity page’s Memory tab. Claude in Slack now shows the footer with the session link, model and cost only on its newest reply in a thread.
Fixes and Improvements
- Managed hooks: Managed-settings
PreToolUsehooks that deny a tool call with"continue": false, and managedprompthooks that block one, now end the turn instead of only refusing the call, and PostToolUse hooks in managed settings no longer fail to applyupdatedMCPToolOutputin some sessions. - Hook input and output: Esc or an interrupt during a
UserPromptSubmithook or a mod’sprompt.submithook no longer ends headless sessions, clears the typed prompt, or lets the unchecked prompt through; hook output is no longer altered when it contains text resembling a plugin hint tag; and PowerShell commands now see variables that hooks write toCLAUDE_ENV_FILEwhen the file holds only plain assignments. - Headless MCP: Headless sessions no longer start a folder’s
.mcp.jsonor plugin MCP server that was switched off for that folder after changing directory or reloading plugins. - Gateway sign-in: A Claude apps gateway that serves
allowedProviderswith"gateway"no longer locks out laptops that name that gateway in user settings, and a saved gateway sign-in is no longer ignored on machines whose managed settings setforceLoginMethodtogatewaywith noforceLoginGatewayUrl(a regression in 2.1.295). - Token counts: Token counts for Haiku 5.5 and other models that take only adaptive thinking no longer fail behind some gateways or get counted with budget thinking elsewhere.
- Permissions: Bash permission checks no longer auto-approve some commands that assign the
BASH_ARGV0shell variable and then use it, and on Windowsrm -rf /c/Users/<name>in Git Bash now asks in bypass permissions mode. Cloud sessions no longer skip auto mode’s checks on Claude in Chrome actions that a saved permission allows when feature flags had not loaded. - Edits to non-UTF-8 files: Edit and NotebookEdit no longer replace every non-ASCII character in files that are not valid UTF-8 (Windows-1252, Shift-JIS, GBK); such edits are now refused.
- Backgrounding with
←: A prompt sent just after←is no longer run twice when the background service is slow to answer, and a prompt sent while SessionStart hooks were still running no longer vanishes when←moves the session; it is still not sent, but↑now brings it back. - Resume:
--teleportno longer opens an empty conversation when the session’s history can’t be read, resumed subagents are no longer told the user rejected a tool call that a session shutdown interrupted, andCLAUDE_CODE_RESUME_INTERRUPTED_TURNno longer re-runs a turn that an MCP tool result had already finished. - Secret redaction: Redaction in shared transcripts and debug logs no longer misses some values that follow a key with no value, including in JSON written inside a shell string.
- Plugins and mods: A plugin’s served
$methods now run in the calling agent’s working directory,$.agent.registeris refused from a hook still running after its mod was reloaded or removed,$.http.fetchno longer refuses aHEADrequest whose response declares aContent-Lengthover the 4 MiB body limit, and a marketplace named likeconstructoris now refused clearly byaddinstead of causing internal errors. - claude.ai sync: Skills synced from claude.ai now finish installing when several sessions share a config directory, and a synced plugin is no longer disabled when its declared marketplace dependency was also synced.
- Workflows: Workflow scripts no longer silently truncate results, agent options and other values nested deeper than about 20,000 levels, and the Workflow tool accepts script files with CRLF line endings.
/code-review: In cloud sessions, the Agent SDK and IDE integrations,/code-reviewno longer ends on a raw JSON array; the findings now print as a numbered list.- Terminal: A stray
52;c;…escape sequence no longer prints after copying in older VTE-based terminals such as MATE Terminal, toasts and notifications no longer wait unseen while the/diffpanel or dialog is open, the link under the mouse pointer is underlined in fullscreen mode, and the transcript toggle (ctrl+o) is more responsive in code-heavy conversations. - Windows: PowerShell commands longer than about 1 KB no longer always ask for permission (allow rules and read-only detection now apply up to 32 KB), stdio MCP servers are no longer force-killed at shutdown, and
claude plugin installretries GitHubowner/reposources over HTTPS on machines with no GitHub SSH key. - Self-hosted runner:
claude self-hosted-runnerno longer prints misleading errors when registration is refused, and a session’s git fetch, pull and push no longer fail while another session of the same repository starts on a runner with--capacityabove 1. - Transcripts:
CLAUDE_CODE_TRANSCRIPT_LOCAL_GCno longer drops a message whose text holds a Unicode line or paragraph separator (U+2028, U+2029) and no longer rewrites a large transcript file when that would free under 10% of it, andclaude purgeno longer leaves such a prompt in the history file. - VS Code:
claudeCode.spinnerVerbsnow appears in the extension’s settings so settings.json completes and validates it, chat links written as a full Windows path now open the file, and the working indicator stops animating when reduced motion is on in your OS, in VS Code, or with theprefersReducedMotionsetting. - Code Review: The Code Review check no longer sometimes stays “in progress” on a pull request after the review finished, and admin settings now say why a setting couldn’t be saved instead of showing a generic failure.
This release contains 79 changes in total; see the full changelog for the complete list.
How to Update
- Check your installed version:
claude --version - Update in place:
claude update - Edit and NotebookEdit now refuse edits to files that are not valid UTF-8 (such as Windows-1252, Shift-JIS or GBK) instead of replacing their non-ASCII characters, so expect a refusal when Claude tries to edit such files.