-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Description
When spawning a teammate in Agent Teams (experimental), the system generates multiple unnecessary round-trips before any actual work can begin. This burns tokens with zero productive output.
Steps to Reproduce
- Create a team with
TeamCreate - Spawn a teammate using the
Tasktool withrun_in_background: trueandteam_nameset - Do not assign any task yet — just spawn
What Happens
The following sequence fires automatically:
- Teammate spawns and sends a "reporting in, ready for tasks" message to the lead
- Lead's turn fires to acknowledge the teammate's check-in message (token cost)
- Teammate goes idle, system sends an
idle_notificationto the lead - Lead's turn fires again to acknowledge the idle notification (token cost)
That's ~4 turns of token burn (2 teammate, 2 lead) with zero productive output — the teammate hasn't done anything yet.
Expected Behavior
Spawning a teammate should be silent until work is assigned. Possible fixes:
- Suppress the initial check-in message — the lead already knows the spawn succeeded from the
Tasktool result - Don't deliver idle notifications to the lead until the teammate has completed at least one task — going idle immediately after spawn is the default state, not news
- Don't force the lead to "respond" to teammate system messages — idle notifications and check-ins shouldn't consume a lead turn
The ideal flow: spawn teammate → assign task → teammate works → teammate reports back. No intermediate chatter.
Environment
- Claude Code with Agent Teams experimental feature enabled (
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: "1") - macOS (Darwin 25.2.0)
- Model: Claude Opus 4.6
Impact
Every agent team session starts with wasted tokens. For teams with multiple teammates, this multiplies — N teammates = ~2N wasted lead turns just from spawn overhead. This makes the "spawn now, assign later" pattern (which is natural for a team lead) unnecessarily expensive.