Skip to content
Proposals/Set autoCompactWindow on subagents so they compa
proposaldeveloperP5High impactClaude Code

Set autoCompactWindow on subagents so they compact earlier than the parent

v2.1.296 lets subagents auto-compact earlier than the parent via autoCompactWindow in frontmatter and --agents, pin all workflow agents to one model with CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL, apply cli-like gateway policies in Desktop's Code tab with managed.policies[].code, and raise 529 retry backoff.

Why this loop

Subagents previously compacted on the same window as the main conversation, so a long-running worker could keep a huge context until the parent compacted. autoCompactWindow on subagent frontmatter and --agents definitions lets that worker auto-compact earlier. Teams that want every workflow agent on one model without changing other subagents can set CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL. Gateway admins can add a code key to managed.policies[] with the same settings as cli so they also apply in Claude Desktop's Code tab; beside desktop, it turns on Desktop gateway mode. Overloaded 529 retries can use a longer maximum backoff via CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS. When Claude needs a whole oversized text file in one Read and context has room, allow_large avoids splitting. Duplicate-named plugins now surface in /plugin when their hooks are left out. This uses only the listed 2.1.296 changes, not the 40 omitted items.

Proposed actions

  1. Add autoCompactWindow to each long-running subagent's YAML frontmatter and to the matching --agents definition, choosing a window earlier than the main conversation so that subagent auto-compacts first.
  2. export CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL=<model-id> before launching Claude Code so every workflow agent uses that one model while other subagents keep theirs.
  3. In Claude apps gateway managed.policies[], add a code key with the same settings as cli so those policies apply in Claude Desktop's Code tab; add desktop beside it to turn on Claude Desktop gateway mode.
  4. export CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS=<milliseconds> to raise the maximum backoff delay when retrying an overloaded (529) request.
  5. When Claude needs the entire contents of a text file past the usual Read size limits and the context has room, instruct it to call Read with allow_large in one call instead of chunking the file.

Agent prompt

Paste into your agent or query via MCP (get_agent_prompt) — free, no extra AI cost

Paste into Claude Code / CLAUDE.md task

DevAgentRadar → Claude Code

You are helping me adopt a real coding-assistant change. Work only from the facts below. Do not invent features.

Context

Assistant: Claude Code Proposal: Set autoCompactWindow on subagents so they compact earlier than the parent Summary: v2.1.296 lets subagents auto-compact earlier than the parent via autoCompactWindow in frontmatter and --agents, pin all workflow agents to one model with CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL, apply cli-like gateway policies in Desktop's Code tab with managed.policies[].code, and raise 529 retry backoff. Primary source: https://github.com/anthropics/claude-code/releases/tag/v2.1.296

Why it matters

Subagents previously compacted on the same window as the main conversation, so a long-running worker could keep a huge context until the parent compacted. autoCompactWindow on subagent frontmatter and --agents definitions lets that worker auto-compact earlier. Teams that want every workflow agent on one model without changing other subagents can set CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL. Gateway admins can add a code key to managed.policies[] with the same settings as cli so they also apply in Claude Desktop's Code tab; beside desktop, it turns on Desktop gateway mode. Overloaded 529 retries can use a longer maximum backoff via CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS. When Claude needs a whole oversized text file in one Read and context has room, allow_large avoids splitting. Duplicate-named plugins now surface in /plugin when their hooks are left out. This uses only the listed 2.1.296 changes, not the 40 omitted items.

Suggested actions

  1. Add autoCompactWindow to each long-running subagent's YAML frontmatter and to the matching --agents definition, choosing a window earlier than the main conversation so that subagent auto-compacts first.
  2. export CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL=<model-id> before launching Claude Code so every workflow agent uses that one model while other subagents keep theirs.
  3. In Claude apps gateway managed.policies[], add a code key with the same settings as cli so those policies apply in Claude Desktop's Code tab; add desktop beside it to turn on Claude Desktop gateway mode.
  4. export CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS=<milliseconds> to raise the maximum backoff delay when retrying an overloaded (529) request.
  5. When Claude needs the entire contents of a text file past the usual Read size limits and the context has room, instruct it to call Read with allow_large in one call instead of chunking the file.

Config surfaces this release may change

  • settings files (high confidence) — check your repo before applying
  • hooks (high confidence) — check your repo before applying
  • context and compaction settings — check your repo before applying
  • subagent definitions — check your repo before applying
  • skills — check your repo before applying
  • MCP servers — check your repo before applying
  • background and headless runs — check your repo before applying
  • permission rules — check your repo before applying

After you finish

Do not report this as applied to DevAgentRadar. You cannot write the visitor's loop.

Tell the human: open https://devagentradar.com/proposals/claude-code-v2-1-296-set-autocompactwindow-on-subagents-so-they-compact- and mark Applied, Skipped, or Failed. Proposal id: 87bf0f68-5677-48bc-8699-6e1732b53820

Your job

  1. Restate the change in one sentence.
  2. Propose a minimal plan for my repo (or a throwaway pilot).
  3. Implement only what I approve; prefer small diffs and tests.
  4. Call out risks (permissions, breaking APIs, cost).

Start by confirming you understood the proposal.

agentmcpmodelpricingsecurityRelease source ↗

Your loop

This browser · no sign-in · not shared as “you”

After you run the prompt

Only you can mark this. Agents cannot write your loop.

Your decision stays on this device. A public tally appears after a few votes.

Originating release signal

Claude Codev2.1.296Oct 9, 2026

v2.1.296

Added a code key to the Claude apps gateway's managed.policies[]: the same settings as cli, also applied in Claude Desktop's Code tab; beside desktop, it turns on Claude Desktop's gateway mode · Added autoCompactWindow to subagent frontmatter and --agents definitions, so a subagent can auto-compact earlier than the main conversation's window · Added CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL to run every workflow agent on one model while other subagents keep theirs · +93 more changes
Verified excerpt — the source's own words

What's changed

  • Added a code key to the Claude apps gateway's managed.policies[]: the same settings as cli, also applied in Claude Desktop's Code tab; beside desktop, it turns on Claude Desktop's gateway mode
  • Added autoCompactWindow to subagent frontmatter and --agents definitions, so a subagent can auto-compact earlier than the main conversation's window
  • Added CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL to run every workflow agent on one model while other subagents keep theirs
  • Added CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS environment variable to set a longer maximum delay for the backoff when retrying an overloaded (529) request
  • Added a note in /plugin on a plugin whose hooks are left out because another enabled plugin has the same name
  • Added an allow_large option to the Read tool 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
  • Fixed managed-settings PreToolUse hooks that deny a tool call with "continue": false, and managed prompt hooks that block one, refusing the call but not ending the turn

Excerpt ends here — this release continues at the source ↗.

Primary source ↗