How to Give Each Claude Code Subagent Its Own Compaction Threshold with autoCompactWindow
Claude Code v2.1.296 lets a subagent auto-compact earlier than the main conversation. Set autoCompactWindow in the subagent's frontmatter or --agents JSON as a plain integer from 100000 to 1000000, and watch out for the 200k parsing trap, the CLAUDE_CODE_AUTO_COMPACT_WINDOW override, and the --agent session mode where the field does nothing.