← cd /blog

Article

Debugging Claude Code's Bypass Permissions Regression

·
tools

Spent two days being politely prompted for permission by software I had explicitly told not to prompt me for permission. bypassPermissions was set in both places the docs say to set it. The blue dialogs appeared anyway, on every single command.

The tell

The allow list in ~/.claude/settings.local.json was accumulating entries across sessions:

{
  "permissions": {
    "allow": [
      "Bash(git status:*)",
      "Bash(npm run build:*)",
      "Bash(ls:*)"
    ]
  }
}

Allow list entries only get added when the permission system is actively running; the system remembers things you've previously approved so it doesn't have to ask again. If bypass mode were actually working, there would be nothing to remember. Something was reverting to default mode on every session start, and the growing allow list was the evidence.

The extension guard

The Claude Code VS Code extension ships as a single file at ~/.vscode/extensions/anthropic.claude-code-[version]/extension.js. The permission decision lives in getInitialPermissionMode():

getInitialPermissionMode() {
  let z = R4("initialPermissionMode") || "default";
  if (z === "bypassPermissions" && !this.getAllowDangerouslySkipPermissions())
    return "default";
  return z;
}

Both checks pass with the correct VS Code settings: claudeCode.initialPermissionMode: "bypassPermissions" and claudeCode.allowDangerouslySkipPermissions: true. The extension correctly hands bypassPermissions to the native binary. The native binary has its own guard.

The binary guard

Before honouring bypass mode, the native Claude binary checks for a third flag: skipDangerousModePermissionPrompt in ~/.claude/settings.json. If it's missing, the binary shows an acceptance dialog.

In a terminal session, that dialog surfaces. Click through once, the setting gets written, done. In VS Code, the dialog never renders. The session silently falls back to default mode. No warning. No log entry. Just every command requiring a blue permission dialog until you figure out what's happening, which in my case took two days.

This is a regression introduced in v2.1.42 (GitHub #25503, opened Feb 13, 2026, four days before I hit it).

The fix

Add this as a top-level key in ~/.claude/settings.json (not nested inside permissions):

{
  "skipDangerousModePermissionPrompt": true,
  "permissions": {
    "defaultMode": "bypassPermissions"
  }
}

Full quit VS Code (Cmd+Q), reopen. No more dialogs.

The complete working setup as of v2.1.42: all three pieces required:

| Location | Key | Value | |----------|-----|-------| | VS Code settings | claudeCode.initialPermissionMode | "bypassPermissions" | | VS Code settings | claudeCode.allowDangerouslySkipPermissions | true | | ~/.claude/settings.json | skipDangerousModePermissionPrompt | true |

The first two are documented. The third isn't; until a fresh GitHub issue accumulates enough comments to show up in search results, which is where I eventually found it.