[BUG] CLI ExitPlanMode prefers auto over the configured acceptEdits default — plan-exit can't return to acceptEdits

Status Open
Reported on v2.1.236
Maintainer reply None cached
Activity 1 comment · opened Sep 16, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

On the CLI, approving a plan offers one elevated accept row chosen by a fixed availability priority —
bypassPermissions > auto > acceptEdits — plus "manually approve edits" (default). With permissions.defaultMode:"acceptEdits" but auto mode merely available, the auto row displaces the acceptEdits row: the dialog shows "Yes, and use auto mode" / "Yes, and manually approve edits" / "No, keep planning" — no acceptEdits option. A user who deliberately configured acceptEdits (opting out of auto) can only approve into auto (rejected) or default, never their configured mode, so every plan approval silently moves the session off acceptEdits.

Cause (from the bundle, cf. #94716): the exit-plan option builder (SBt) selects the elevated row by availability, not by configured default — else if (isAutoModeAvailable) {auto row} fires before the else {acceptEdits row}.

What Should Happen?

the elevated accept row should follow the session's configured / pre-plan defaultMode, or offer a "return to prior mode" row. Same theme as #94716 (VS Code hardcodes the rows) and #93207 (iOS discards prePlanMode).

Error Messages/Logs

Steps to Reproduce

Preconditions: CLI (terminal); auto mode available for your account/model (it appears in the shift+tab permission-mode cycle); permissions.defaultMode: "acceptEdits".

  1. In ~/.claude/settings.json set "permissions": { "defaultMode": "acceptEdits" }. Start a fresh claude session.
  2. Confirm the session is in acceptEdits, and that auto is also selectable (cycle shift+tab — plan / acceptEdits / auto all present).
  3. Enter plan mode and give the model a task so it produces a plan (e.g. "plan a small refactor").
  4. Approve the plan when the ExitPlanMode chooser appears.
  5. Observe the accept rows: Yes, and use auto mode / Yes, and manually approve edits / No, keep planning — there is no row that keeps/returns to acceptEdits.
  6. Pick either accept row and check the mode (shift+tab indicator / statusline): the session is now auto or default — never back in acceptEdits.

Contrast: on a session where auto mode is not available, the same flow offers an acceptEdits accept row instead of the auto one (the else branch of SBt in #94716). So the trigger is specifically auto-available + defaultMode acceptEdits — the auto row displaces the acceptEdits one.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.236 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗