[BUG] Plan mode blocks execution in don't-ask mode

Resolved 💬 4 comments Opened Mar 3, 2026 by scottleibrand Closed Apr 1, 2026

Bug Description

When Claude Code is running in "don't ask" mode (pre-approved permissions, unapproved tools are denied without prompting), Claude can autonomously enter plan mode via EnterPlanMode, but then gets stuck at the ExitPlanMode approval prompt which requires user interaction to proceed.

This creates a deadlock: the permission model says "deny without asking", but ExitPlanMode unconditionally presents an interactive approval UI and blocks all further processing until the user responds.

Steps to Reproduce

  1. Run Claude Code in don't-ask mode with tools pre-approved via permissions config
  2. Give it a task that involves enough complexity that Claude decides to enter plan mode
  3. Claude calls EnterPlanMode, explores the codebase, writes a plan
  4. Claude calls ExitPlanMode — the approval prompt appears and blocks indefinitely
  5. No further work happens until a human intervenes

Expected Behavior

EnterPlanMode should be suppressed in don't-ask mode so Claude proceeds directly with implementation.

Actual Behavior

Claude enters plan mode, writes a plan, then the session hangs at the plan approval prompt. The user must manually interact to unblock it, defeating the purpose of don't-ask mode.

Context

This affects any workflow where Claude Code runs with reduced interactivity but the user may still be present — e.g., long-running sessions where the user steps away. The key issue is that don't-ask mode is designed so Claude can make forward progress without blocking on user input, but plan mode creates an unavoidable block.

Related Issues

  • #29064 — Agent teammates stuck in plan-mode approval loops (same root cause, different trigger: spawned agents vs main instance)
  • #29110 — bypassPermissions ineffective + plan mode loop in spawned agents

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6
  • macOS Darwin 25.3.0

View original on GitHub ↗

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