Skip to content

Claude Code

Subagents in Claude Code 2.1.296 can compact early

4 min read

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →

In Claude Code 2.1.296, out October 9, a subagent can auto-compact earlier than the main conversation does, through a new autoCompactWindow field in its frontmatter or in --agents definitions. The other change older repos will notice is in Edit and NotebookEdit: on files that are not valid UTF-8, such as Windows-1252, Shift-JIS or GBK, they now refuse the edit. Before, they replaced every non-ASCII character in the file.

The release notes on GitHub add two more controls for subagents and a long run of fixes to hooks, permissions and Windows behaviour.

What subagents get

A subagent works in its own context and hands back only its result. On a long log, its window can fill well before the main chat’s does. autoCompactWindow lets that one agent compact earlier than the main conversation’s window would trigger it, and the parent session keeps its own threshold.

CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL is the blunter control. Set it, and every workflow agent runs on one model, while other subagents keep the model they were given. The Read tool also gains allow_large, 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.

Two fixes cover the same area. A subagent resumed after a session shutdown is no longer told that the user rejected a tool call the shutdown actually interrupted. And --debug now names unrecognized frontmatter fields in custom agent files, with a hint for likely typos.

Windows and older encodings

The Edit refusal applies to any file that is not valid UTF-8. The three encodings above are just the examples the notes give. The release also carries several Windows fixes. PowerShell commands longer than about 1 KB used to ask for permission every time; allow rules and read-only detection now apply up to 32 KB. The Workflow tool accepts script files with CRLF line endings, such as files checked out on Windows. At shutdown, stdio MCP servers now get their stdin closed first, and the process tree is killed only if the server is still running after 300 ms.

Costs, limits and retries

For Sonnet 5.5, /cost, the status line, --max-budget-usd and the SDK’s cost figures now price cache reads at $0.10 per million tokens, down from $0.20. Since --max-budget-usd uses the same figure, a Sonnet 5.5 session heavy on cache reads now takes longer to hit a given cap than it did on 2.1.295.

MCP servers get more room. The default limit on tool descriptions sent up front, and on server instructions, goes from 2,048 to 4,096 characters.

For overloaded (529) requests, CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS sets a longer maximum delay for the retry backoff. It sits next to the base-delay variable added in 2.1.292, which sets a longer base delay for the same retries.

For admins: hooks, permissions, gateway

A PreToolUse hook in managed settings that denied a tool call with "continue": false, or a managed prompt hook that blocked one, used to refuse the call without ending the turn. That is fixed. PostToolUse hooks in managed settings also now apply updatedMCPToolOutput in the sessions where they used to skip it.

Bash permission checks used to auto-approve some commands that assign the BASH_ARGV0 shell variable and then use it. Those commands now prompt for approval. On Windows, rm -rf /c/Users/<name> in Git Bash now asks even in bypass permissions mode. Cloud sessions no longer skip auto mode’s checks on Claude in Chrome actions that a saved permission allows when their feature flags had not loaded.

On the Claude apps gateway, managed.policies[] takes a code key. It holds the same settings as cli and also applies them in Claude Desktop’s Code tab; placed beside desktop, it turns on Claude Desktop’s gateway mode. A 2.1.295 regression is fixed too: a saved gateway sign-in was ignored on machines whose managed settings set forceLoginMethod to gateway with no forceLoginGatewayUrl.

To find a slow hook, --debug now logs every command hook on tool calls, prompts, SessionStart and Stop when it finishes, with its command, plugin, outcome and duration.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.