VS Code panel hardcodes the plan-approval buttons to acceptEdits/default, so the CLI's "Yes, and use auto mode" row never appears

Status Open
Reported on v2.1.273
Maintainer reply None cached
Activity 0 comments · opened Sep 16, 2026

Summary

In the VS Code panel, the plan-approval dialog always offers the same two accept
buttons, "Yes, and auto-accept" and "Yes, and manually approve edits", even
when auto mode is available and is the session's configured default. Accepting a plan
therefore always lands the session in acceptEdits or default, never back in auto.

The bundled CLI does supply an auto row for this dialog. The webview never reads it:
its two plan buttons are hardcoded.

Environment

| | |
|---|---|
| Extension | anthropic.claude-code 2.1.273 (darwin-arm64), bundled CLI 2.1.273 |
| Also reproduced on | extension 2.1.272 |
| CLI (terminal install) | 2.1.268 |
| VS Code | 1.137.0 |
| OS | macOS 27.0 (26A428), arm64 |
| Model | claude-opus-5[1m] |
| Settings | permissions.defaultMode: "auto", useAutoModeDuringPlan left at its default (on) |

Expected

With auto mode available, the accept row should be "Yes, and use auto mode"
(yes-resume-auto-mode), which is what the bundled CLI builds and what the terminal
UI shows for the same session.

Actual

Three fixed rows: Yes, and auto-accept / Yes, and manually approve edits /
No, keep planning. No way to return to auto, so a session that was in auto before
planning silently degrades on every plan approval.

The CLI does send the auto row

resources/native-binary/claude (2.1.273), option builder for the exit-plan dialog
(minified, reformatted):

function SBt({showClearContext:h, isAutoModeAvailable:ee, isBypassPermissionsModeAvailable:ne,
              autoModeGateSnapshot:Se, approvalsWithheld:we=!1, ...}) {
  let He = Boolean(ee) && Se;
  ...
  if (ne) { /* bypassPermissions row */ }
  else if (He) {
    let ot = bwt("exit-plan-resume");          // label: "Yes, and use auto mode"
    De["yes-resume-auto-mode"] = ot;
    Le["yes-resume-auto-mode"] = "auto";
    Ie.push({label: ot.node, value: "yes-resume-auto-mode"});
  }
  else { /* XZ("acceptEdits", {labelVariant:"plan-keep-context"}) */ }

with

var Cwn = { workflow: "Yes, and switch to auto mode",
            "exit-plan-resume": "Yes, and use auto mode" };

The webview ignores it

webview/index.js, same extension build. G is the ExitPlanMode branch
(var UF="ExitPlanMode", G = $.toolName === UF):

// button 1
x = async () => {
  if (Q(), G) { await Z("acceptEdits", !0); ... }
  ...
}

// button 2
var ZG0 = Object.freeze({type:"setMode", mode:"default", destination:"session"});
t1 = async () => {
  let S0 = (G ? [ZG0] : $.suggestions).map(...)
  ...
}

// labels
let N0 = "Yes"; if (G) N0 = "Yes, and auto-accept"; else if (q) N0 = "Submit answers";
... G ? "Yes, and manually approve edits" : <suggestion row>

For ExitPlanMode the webview replaces $.suggestions (the rows the CLI built) with a
frozen setMode: "default", and button 1 calls acceptEdits unconditionally. Nothing
in the bundle can produce the auto row:

$ grep -o 'type:"setMode",mode:"[a-zA-Z]*"' webview/index.js | sort | uniq -c
   1 type:"setMode",mode:"default"
$ grep -c "use auto mode" webview/index.js
0

Not an availability problem

The gate is open in every window, including during the failing dialog:

[auto-mode] verifyAutoModeGateAccess: enabledState=enabled disabledBySettings=false
  model=claude-opus-5[1m] modelSupported=true disableFastModeBreakerFires=false
  carouselAvailable=true canEnterAuto=true

Auto is also present and selectable in the panel's own permission-mode picker at the
same time. Only the plan dialog lacks it.

Reproduction

  1. Set permissions.defaultMode: "auto" in user settings.
  2. Open the VS Code panel, enter plan mode, let the model produce a plan.
  3. Approve it.
  4. Check the permission mode afterwards: acceptEdits (button 1) or default

(button 2). The same session approved from the terminal UI offers
"Yes, and use auto mode" and stays in auto.

Workaround

Pick button 2, then switch back to Auto by hand via shift+tab or the mode picker.
Button 1 moves away from auto in the other direction.

Suggested fix

Render the accept rows the CLI already sends ($.suggestions / keepContextRows)
for ExitPlanMode instead of the hardcoded acceptEdits / default pair, the same way
the panel renders suggestion rows for ordinary permission prompts.

Related

  • #94682 — the panel drops Auto from the permission-mode picker while the host logs

canEnterAuto=true. Same underlying theme (the webview decides for itself instead of
using what the host sends), different surface. In this report the picker is fine.

  • #90571 — same picker, via a model alias missing from the models list.
  • #93207 — iOS plan approval sends setMode auto and discards prePlanMode.

View original on GitHub ↗