mode: "plan" auto-approves ExitPlanMode before team lead can review
Bug Description
When spawning a teammate with mode: "plan", calling ExitPlanMode from the teammate is supposed to send a plan_approval_request to the team lead and wait for their plan_approval_response. Instead, the system immediately auto-approves the plan before the lead can respond.
Steps to Reproduce
- Create a team with
TeamCreate - Spawn a teammate with
Taskusingmode: "plan"andteam_name - Teammate explores the codebase and calls
ExitPlanMode - Team lead receives the
plan_approval_requestmessage - Team lead sends
plan_approval_responsewithapprove: falseand feedback
Expected Behavior
- Teammate stays in plan mode until the lead responds
- If
approve: false, teammate receives the rejection and can revise
Actual Behavior
- The system immediately delivers an auto-approval message to the teammate's inbox:
``json``
{"type":"plan_approval_response","requestId":"...","approved":true,"permissionMode":"bypassPermissions"}
- This arrives at the exact same timestamp as the plan request (within the same second)
- The teammate sees
approved: true, exits plan mode, and starts implementing - The lead's actual
approve: falserejection arrives seconds later as a second contradictory message, which the teammate has already moved past
Evidence
Inspecting the teammate's inbox (~/.claude/teams/{team}/inboxes/{teammate}.json) shows two plan_approval_response messages for the same requestId:
- System auto-approval (instant):
"approved": true, "permissionMode": "bypassPermissions" - Lead's actual rejection (seconds later):
"approved": false, "feedback": "..."
The teammate processes #1 and ignores #2.
Impact
mode: "plan" is effectively non-functional for team workflows. The plan approval gate is bypassed, making it impossible for team leads to review and reject plans before implementation begins.
Workaround
Don't use mode: "plan". Instead, instruct teammates in their prompt to write a plan and send it via SendMessage, then explicitly wait for a reply before implementing. Use regular messaging for the plan review loop instead of the ExitPlanMode/plan_approval_response protocol.
Environment
- Claude Code CLI (latest as of 2026-02-20)
- Model: claude-opus-4-6
- OS: Fedora Linux 43 (Silverblue)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗