[Bug] VSCode: exiting plan mode ignores permissions.defaultMode: "auto" and silently lands in acceptEdits (no choice offered)
Bug Description
In the Claude Code VSCode extension, exiting/approving plan mode always drops the session into acceptEdits ("edit") mode, regardless of permissions.defaultMode.
With permissions.defaultMode: "auto" configured, new sessions correctly start in auto. But after entering plan mode and approving the plan, the session lands in acceptEdits and never returns to auto. Unlike the CLI, the VSCode extension presents no choice at plan-exit — there is no "1. Yes, and bypass / 2. manually approve / …" dialog to arrow through. The transition to acceptEdits is silent and unconfigurable.
Steps to Reproduce
- Set
"permissions": { "defaultMode": "auto" }in~/.claude/settings.json(and/or a project.claude/settings.json). - Open a Claude Code pane in VSCode. Confirm the session starts in
automode. ✔ - Enter plan mode (Shift+Tab to cycle, or the model proposes a plan and you approve it).
- Approve the plan / exit plan mode.
Expected
After exiting plan mode, the session returns to the configured defaultMode (auto) — or, at minimum, the post-exit mode is configurable.
Actual
The session lands in acceptEdits ("edit") mode. defaultMode: "auto" is neither restored nor consulted, and no option to choose the post-exit mode is presented in the VSCode UI. The only workaround is to Shift+Tab back to auto manually after every plan approval.
Root cause (from inspecting the installed bundle)
permissions.defaultMode governs only the initial session mode; plan-mode exit is a separate state transition that does not re-read it. In the installed CLI binary the plan-exit mode resolves to an explicitly-passed mode or a hardcoded fallback (permissionMode ?? "default"), not defaultMode. I could not locate any setting — in Claude Code settings.json or as a VSCode claudeCode.* setting — that controls the post-plan-exit permission mode.
Notably, the VSCode extension's own defaultMode schema (claude-code-settings.schema.json) enumerates only acceptEdits | bypassPermissions | plan and omits auto — so the extension has no concept of returning to auto after a plan exit, even though the underlying engine honors auto at session start.
Ask
Make the VSCode plan-exit transition respect permissions.defaultMode (return to auto when that's the configured default), or add a dedicated setting (e.g. permissions.planExitDefault) to control it. From a safety standpoint, silently landing in a more permissive mode than the user explicitly configured is the wrong default.
Related
- #62459 — same root ask, but for the CLI (where the plan-exit dialog defaults its highlighted option to
bypassPermissions). This issue is the VSCode-extension variant: no dialog is shown and the mode is hardcoded toacceptEdits.
Environment
- Surface: VSCode extension
anthropic.claude-codev2.1.170 (darwin-arm64) - CLI: v2.1.172
- Platform: macOS (Darwin 25.5.0, arm64)
permissions.defaultMode:"auto"(set at both user and project scope)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗