Allow controlling autocompact when spawning teammates

Resolved 💬 4 comments Opened Feb 19, 2026 by TomNeyland Closed Mar 20, 2026

Problem

When spawning agent teammates, there's no way to control the autocompact setting per-teammate. Teammates inherit the lead session's global setting.

Use case

I run my main Claude Code session with autocompact off — I prefer to manage context manually. But when I spawn teammates, they fill their context window and either get stuck or require constant monitoring/interruption to prevent them from hitting the limit and stopping.

I'd like to keep autocompact off for my own session but have Claude Code able to launch teammates with autocompact on.

Proposed solution

Add an autocompact parameter (or similar) to the teammate spawning flow that overrides the global setting for that specific teammate.

Why existing options don't solve this

  • CLAUDE_AUTOCOMPACT_PCT_OVERRIDE in settings.json is global — affects the lead session too
  • autoCompact: false in settings is also global
  • There's no per-teammate or per-spawn override

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗