mode: "plan" auto-approves ExitPlanMode before team lead can review

Resolved 💬 4 comments Opened Feb 20, 2026 by alexwiench Closed Apr 15, 2026

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

  1. Create a team with TeamCreate
  2. Spawn a teammate with Task using mode: "plan" and team_name
  3. Teammate explores the codebase and calls ExitPlanMode
  4. Team lead receives the plan_approval_request message
  5. Team lead sends plan_approval_response with approve: false and 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: false rejection 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:

  1. System auto-approval (instant): "approved": true, "permissionMode": "bypassPermissions"
  2. 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)

View original on GitHub ↗

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