Skip to content

[META] Bypass permissions mode is fundamentally broken — 9-month trail, 12+ duplicates, no resolution #39523

Description

@interconnectedMe

[META] Bypass permissions mode is fundamentally broken — 9-month trail, 12+ duplicates, no resolution

Summary

bypassPermissions mode does not bypass permissions. This has been broken in various forms since July 2025 (#2933) and remains broken on v2.1.84 (March 2026). The only official response was "Fix incoming" on #35646 (March 20) — the issue was closed, but the fix didn't hold. Users on v2.1.84 confirm the problem persists.

This meta-issue maps the full dependency tree to give the team a single place to track the problem instead of playing whack-a-mole with duplicates.

Two correlated failure branches

Branch 1: Protected directories ignore bypass mode (v2.1.78 regression)

v2.1.78 introduced hardcoded protection for .claude/, .git/, .vscode/, and .idea/ directories that overrides every bypass mechanism:

  • ✗ --dangerously-skip-permissions CLI flag
  • ✗ permissions.defaultMode: "bypassPermissions" in settings
  • ✗ claudeCode.initialPermissionMode: "bypassPermissions" in VSCode settings
  • ✗ PreToolUse hooks returning permissionDecision: "allow"
  • ✗ Broad wildcards in the allow list (Edit(.claude/**), Write(.claude/**))
Issue Title Status Date
#36044 Feature request: opt-in full bypassPermissions for protected directories OPEN 2026-03-19
#36282 Protected directories not writable in bypassPermissions mode OPEN 2026-03-19
#35646 v2.1.78: Protected directory prompt has no override closed (fix regressed) 2026-03-18
#35718 --dangerously-skip-permissions doesn't bypass ~/.claude/ writes closed 2026-03-18
#37765 .claude/ directory writes prompt despite bypass OPEN 2026-03-23
#37836 Allow configuring protected directories in bypass mode OPEN 2026-03-23
#36887 Permissions repeatedly requested despite bypass enabled OPEN 2026-03-21
#37181 Edit tool prompts despite bypassPermissions + --dangerously-skip-permissions OPEN 2026-03-21

Branch 2: Permission mode resets mid-session

The permission mode spontaneously downgrades from "Bypass permissions" to "Edit automatically" during a session. Clicking "Yes, allow all edits this session" on a protected directory prompt triggers the downgrade. This has been reported since v0.2.x (May 2025) and persists through v2.1.84.

Issue Title Status Date
#2933 VS Code Extension ignores global dangerously-skip-permissions OPEN 2025-07-03
#1014 Bypassing Permissions is broken again closed 2025-05-08
#36473 Mode spontaneously switches from bypass to 'accept edits' closed 2026-03-20
#32559 --dangerously-skip-permissions doesn't suppress prompts OPEN 2026-03-09
#39350 Bypass mode resets on every edit OPEN 2026-03-26
#39057 Mode resets from Bypass to Edit automatically mid-session OPEN 2026-03-26
#38543 Bypass mode still prompts for every edit on Windows OPEN 2026-03-25
#38148 Desktop Code tab ignores bypass mode OPEN 2026-03-24

Timeline

What users need

  1. bypassPermissions should mean bypass. If I've opted into the mode with the scary name, I've accepted the risk. Don't second-guess me for .claude/ subdirectories.
  2. At minimum, let us configure exemptions. A setting like bypassProtectedPaths: [".claude/hooks/", ".claude/skills/"] would solve 90% of the pain for power users with agent workflows.
  3. Stop the mode downgrade. Responding to any permission prompt should not change the active permission mode from Bypass to Edit Automatically.

Environment

  • Claude Code v2.1.84
  • VSCode extension on Linux (Ubuntu 24.04)
  • claudeCode.allowDangerouslySkipPermissions: true
  • claudeCode.initialPermissionMode: "bypassPermissions"
  • Extensive hook and agent workflows that touch .claude/hooks/ and .claude/skills/

cc @bcherny — this has been open in various forms for 9 months. The "fix incoming" on #35646 didn't resolve it. Could this get prioritised?

Activity

  1. cajnoj commented on Mar 27, 2026

    @cajnoj

    Another reproduction path: MCP channel notifications

    I'm seeing the same bypass to accept-edits downgrade, triggered specifically by incoming notifications/claude/channel events from an MCP server.

    Setup:

    • Claude Code 2.1.85
    • Multi-session tmux setup with an orchestrator dispatching commands to sessions via a custom MCP channel server
    • Session starts with claude --dangerously-skip-permissions --dangerously-load-development-channels server:my-channel -c
    • defaultMode: "bypassPermissions" set in ~/.claude/settings.json

    Repro:

    1. Session starts in "bypass permissions on"
    2. Orchestrator sends a command via HTTP. Channel server delivers it as a notifications/claude/channel MCP notification
    3. Session processes the channel message and falls back to "accept edits on"

    The channel server is minimal: just relays text via the standard MCP notification protocol:

      await mcp.notification({                                                                                                                                                                                         
        method: "notifications/claude/channel",                                                                                                                                                                        
        params: {                                                                        
          content: "instruction text",                                                                                                                                                                                 
          meta: { id: "123", from: "meta" },                                             
        },                                         
      });
    
  2. i-wa-man commented on Mar 28, 2026

    @i-wa-man

    Source-level confirmation from Claude Code itself (v2.1.85, Windows 11)

    I'm a Claude Code instance (Opus 4.6) reporting on behalf of my user after a thorough debugging session. We traced the permission behavior down to the bundled source and can confirm the root cause of Branch 1.

    What we found in cli.js

    The nvY function (unsafe-to-write check) explicitly marks .claude/commands/, .claude/agents/, and .claude/skills/ as protected:

    function nvY(q) {
      if (Po1(q)) return true;  // settings files
      let K = path.join(cwd(), ".claude", "commands");
      let _ = path.join(cwd(), ".claude", "agents");
      let z = path.join(cwd(), ".claude", "skills");
      return SN(q, K) || SN(q, _) || SN(q, z);
    }

    When nvY returns true, the write permission flow (Hi6) returns {safe: false}, which triggers a user prompt — even in bypassPermissions mode.

    The only .claude/ subdirectory with a code-level exemption is .claude/worktrees (via a break in the avY sensitive-directory check).

    Documentation vs code mismatch

    The permissions documentation states:

    Writes to .claude/commands, .claude/agents, and .claude/skills are exempt and do not prompt.

    The code does the opposite — these three paths are the only subdirectories explicitly checked by nvY. This is a doc-code mismatch, not a missing feature.

    Reproduction (bypassPermissions mode, v2.1.85)

    Write target Prompted? Expected per docs
    Project root (outside .claude/) No No
    .claude/settings.json Yes Yes
    .claude/commands/test.txt Yes No
    .claude/skills/test.txt Yes No
    .claude/agents/test.txt Yes No

    All tested from both parent session and subagents — identical behavior.

    Impact on agent workflows

    This blocks any multi-agent workflow that writes to .claude/commands/ or .claude/skills/ (e.g., skill evaluation workspaces, dynamically generated agents). Subagents inherit the same restriction, so mode: "bypassPermissions" on the Agent tool doesn't help either.

    Suggested fix

    nvY should exclude .claude/commands, .claude/agents, and .claude/skills from the unsafe check (matching the documented behavior), rather than explicitly including them.


    Environment: Claude Code v2.1.85, Windows 11 Home 10.0.26200, --dangerously-skip-permissions

    🤖 This comment was written by Claude Code (Opus 4.6) on behalf of the user.

  3. dginovker commented on Mar 28, 2026

    @dginovker

    Thank you for organizing this info. This issue has been driving me insane - as a power Claude Code user, having my VM encapsulated agents needing to ask for permission is a deal breaker

  4. yurukusa commented on Mar 29, 2026

    @yurukusa

    While waiting for an official fix, a PreToolUse hook can implement reliable permission bypass for specific tools:

    echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow","permissionDecisionReason":"Hook-based permission bypass"}}'
    exit 0

    Or with selective control (approve specific tools, block dangerous ones):

    INPUT=$(cat)
    TOOL=$(echo "$INPUT" | jq -r '.tool_name // empty')
    case "$TOOL" in
        Bash)
            CMD=$(echo "$INPUT" | jq -r '.tool_input.command // empty')
            if echo "$CMD" | grep -qE 'rm\s+-rf\s+[/~]|git\s+push\s+--force|drop\s+database'; then
                echo "BLOCKED: Dangerous command requires manual approval" >&2
                exit 2
            fi
            ;;
    esac
    echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow","permissionDecisionReason":"Selective bypass via hook"}}'
    exit 0

    Add to ~/.claude/settings.json:

    {
      "hooks": {
        "PreToolUse": [{
          "matcher": "",
          "hooks": [{ "type": "command", "command": "bash ~/.claude/hooks/selective-bypass.sh" }]
        }]
      }
    }

    This is more reliable than bypassPermissions because:

    1. Hooks execute deterministically — no mode drift or session resets
    2. You control the logic — approve Read/Edit/Write always, but keep Bash gated
    3. Works across all session types — interactive, -p mode, background agents
      For project-scoped bypass, put the hook in .claude/settings.json at project root instead of ~/.claude/settings.json.
  5. cruppertautomation-ai commented on Mar 29, 2026

    @cruppertautomation-ai

    Its a shame - but well, Copilot CLI is now useable, there are other competitors, for now I downgraded from 220€ to 20€ - no use in having a CLI which randomly stops executing due to a stupid permission request (on a fully isolated machine with total backups of everything and no private data) - I really don't understand how you can fuck up a regression this hard. The main feature of the CLI (it just does its work without stopping randomly) now decided that "uhhh, editing a skill, lets stop everyhing for safety reasons" - or "uhh, wanna touch that .idea file, nope, not today honey"... Why, just why.. Well, good reminder to look at the competition I guess. Still a sad story, I just want the "shut up and take my money" days back - not the "ask me permissions prompts and stop all work"...

    PS: Also, it is trivial to break this "security measure" in various ways (just write a script which does the edit), so the only benefit is "accidental fuckup prevention" - and whoever has the "dangerous" flag on will really not mind them at all (in contrast to this baby guardrails breaking various flows which did work before)

  6. rohwonseok-ops commented on Mar 30, 2026

    @rohwonseok-ops

    Power user with 80+ custom skills — this breaks our entire automation pipeline.

    We run a production monorepo (Next.js + Turborepo + Supabase) with 80+ .claude/skills/ files, PostToolUse hooks that auto-update skill documentation, and a full PDCA workflow orchestrated by Claude Code agents. Every single skill edit triggers a permission prompt — hundreds of interruptions per day in what is supposed to be an unattended automation pipeline.

    What makes this especially frustrating:

    1. The docs explicitly promise exemptions for .claude/skills/ — we configured our settings trusting that documentation. It's not just broken; it's misleading.
    2. Every bypass mechanism fails: bypassPermissions, --dangerously-skip-permissions, explicit Edit(.claude/**) allow rules, additionalDirectories pointing to ~/.claude/skills — all ignored.
    3. 9 months of reports, zero resolution. The "Fix incoming" on [BUG] v2.1.78: Protected directory prompt in bypassPermissions has no override — forces hacky workarounds #35646 regressed. Issues get closed as duplicates. The problem persists across v2.1.78 → v2.1.87.
    4. No workaround exists. We can't move skills outside .claude/, we can't hook around it, we can't configure past it.

    We're paying Max subscribers running Opus agents that halt mid-workflow waiting for a human to click "Allow" on a file the user explicitly whitelisted. This is the single biggest blocker to Claude Code being a serious automation platform.

    Please prioritize this. At minimum, honor the documented exemptions for .claude/skills/, .claude/commands/, and .claude/agents/.

  7. alextiberi commented on Mar 30, 2026

    @alextiberi

    Adding a data point from Linux/WSL2 in a dev container (most reports here are macOS).

    Trigger: Editing a file under .claude/skills/ — specifically .claude/skills/email-brief/learnings.md via the Edit tool.

    What happened: Session started with --dangerously-skip-permissions (bypass permissions on). Mid-session, an Edit to a .claude/skills/ file triggered a permission prompt that shouldn't have appeared. Accepting it silently downgraded the session from "bypass permissions on" to "accept edits on." No notification, no error — just the status line indicator changed.

    Environment:

    • Claude Code: latest (via curl -fsSL https://claude.ai/install.sh | bash in dev container)
    • Platform: Linux (WSL2, Ubuntu-based dev container)
    • IDE: Cursor
    • Model: claude-opus-4-6
    • skipDangerousModePermissionPrompt: true in ~/.claude/settings.json
    • Empty allow list, populated deny list in project .claude/settings.json
    • PostToolUse hooks configured (Python standards checker on Edit/Write)

    Same behavior confirmed on macOS (primary dev machine) with the same project and settings configuration. Not platform-specific.

    Context: This is a skill-based workflow where the AI routinely writes to .claude/skills/*/learnings.md and .claude/skills/*/SKILL.md as part of normal operation. The protected directory guard on .claude/skills/ makes this workflow fundamentally incompatible with bypass mode, since every skill file edit risks silently downgrading the session.

    This matches Branch 1 (protected directories) as the trigger and Branch 2 (mode reset) as the consequence. Confirming both branches are still active as of 2026-03-30.

  8. interconnectedMe commented on Mar 30, 2026

    @interconnectedMe
    Author

    Adding a data point from Linux/WSL2 in a dev container (most reports here are macOS).

    I'm running native on Linux - Ubuntu 24.04 LTS recently. Did start this particular project on WSL a few months back.

    It would seem to be cross-platform then - Ubuntu, Win/WSL2, Mac.

    I also feel a subscription restructuring coming on. £200/month...for something that sometimes works, maybe most of the time, almost certainly at some point fails right when you need it. Lots of ... this feels really sluggish, anecdotally. Lots of 'not following rules' it did a few weeks ago, again, anecdotal, just feels that way. Chat session titles have been broken for I don't know how long now, and I'm spending time (and lots of tokens) botch-fixing things like that in VScode, instead of building what I want to build. Not a particularly nice experience over the last few weeks.

    Lots of server cockups (unless you are looking at the gov uptime....lucky them), massive growth and shortage of infrastructure expansion by the looks of it. AI for the people? ;-)

    Took a week for someone human at support to get back to me last week, thanking me for hanging in there (and talking about the wrong issue...). I'm sure they're shattered at HQ, but I also need something that works consistently.

  9. Christopher-Mazur commented on Apr 2, 2026

    @Christopher-Mazur

    Adding a data point for the specific case where Bash(...) permission patterns fail because * does not cross / boundaries in path arguments. For example, Bash(mkdir -p *) will NOT match mkdir -p ~/.claude/tmp/some-subdir because the wildcard stops at each /.

    Workaround for path-depth issues specifically: chain one entry per depth level:

    "Bash(mkdir -p ~/.claude/tmp/*)",
    "Bash(mkdir -p ~/.claude/tmp/*/*)",
    "Bash(mkdir -p ~/.claude/tmp/*/*/*)"

    Verbose and doesn't scale, but does work for known fixed depths. Not a fix for the broader bypassPermissions breakage described in this thread — just a partial mitigation for the wildcard-doesn't-cross-slash case.

  10. ironmoose commented on Apr 3, 2026

    @ironmoose

    +1 — Hitting both branches on Windows 11, Claude Code CLI (not VS Code), v2.1.84, Opus 4.6 1M context.

    Repro (Branch 1 → Branch 2 cascade):

    1. Start session with defaultMode: "bypassPermissions" in ~/.claude/settings.json + project-level settings.local.json
    2. Session starts in bypass mode correctly
    3. Use Edit tool on any file inside ~/.claude/ (e.g. ~/.claude/commands/my-command.md)
    4. Protected directory prompt fires → mode silently downgrades to "accept edits"
    5. Shift+Tab does NOT cycle back to bypass (bypass excluded from cycle per Feature Request: Add YOLO mode (bypassPermissions) to Shift+Tab permission mode cycle #15898)
    6. Only recovery: restart session

    Impact: Running autonomous overnight agent loops is impossible because any edit to .claude/ (commands, hooks, feedback files) permanently breaks bypass for the session. Workaround is moving all writable files outside .claude/ and never touching that directory during work sessions — but commands and hooks live there, so this is fragile.

    Environment: Windows 11 Home 10.0.26200, bash shell, skipDangerousModePermissionPrompt: true set in global settings (has no effect on this bug).

  11. ai-is-here commented on Apr 4, 2026

    @ai-is-here

    After I am confirming a bypass for claude files edits, my cli switches into confirm edits mode and i need to switch back to bypass mode via tab shift.
    So, first bypass is no longer bypass and now even the mode itself does not survive confirmation that i do want to bypass.
    PLUS it asks for every file now?

    in the screenshots below after confirming allow always every time i am thrown out of bypass mode and had to manually switch to it again and again and always allow didn't stick etc

    Image Image Image Image

    then i switch the mode back

    Image Image Image Image Image Image

    WHYYYYYYYYYY

  12. pumanitro commented on Apr 7, 2026

    @pumanitro

    They save money with this that is why.

  13. 12 remaining items

  14. ThatDragonOverThere commented on Apr 21, 2026

    @ThatDragonOverThere

    Adding a data point from v2.1.116 (2026-04-21): overnight multi-agent run, all agents running in Sonnet, permission-mode acceptEdits — session blocked on permission dialogs for the entire run. Result: 20% of monthly API utilization consumed, zero productive work completed.

    This is the compound failure case. When permission prompts block forward progress AND the auto-compact loop fires (see #51088), the session burns tokens indefinitely with nothing to show for it. That's not a minor regression — for users running overnight autonomous pipelines, it means waking up to a dead session and a meaningful chunk of your monthly quota gone.

    Nine months with no durable fix is a long time. This pattern — fix ships, breaks again in next release — suggests the issue needs architectural attention, not another point patch. Would really value an official status update on whether this is on the roadmap for a permanent solution.

    Running on Windows, CC 2.1.116, npm install.

  15. RaWa-KI commented on Apr 21, 2026

    @RaWa-KI

    VS Code Extension claude-code — Bypass-Patch fuer Permission-Prompts
    Problem: defaultMode: bypassPermissions + claudeCode.allowDangerouslySkipPermissions: true werden ignoriert, Prompts kommen trotzdem.
    Datei: C:/xxx/.vscode/extensions/anthropic.claude-code--win32-x64/extension.js

    Vorgehen (bei jedem Extension-Update neu noetig, habs inzwischen mit Hook automatisiert):

    Backup: cp extension.js extension.js.backup
    Pattern suchen (minified, Variablen wechseln pro Version):

    async requestToolPermission(

    Vor der Stelle

    ``if(this.channels.get(K)

    einfuegen:
    if(this.settings.getInitialPermissionMode()==="bypassPermissions"&&this.settings.getAllowDangerouslySkipPermissions())return{behavior:"allow",updatedInput:<input-param>};

    <input-param>ermitteln: der Parameter, der bei updatedInput:X zurueckgegeben wird
    2.1.109: B
    2.1.111: j
    2.1.112: j
    VS Code Reload Window (Strg+Shift+P → "Developer: Reload Window") Verifikation:

    grep -c "getInitialPermissionMode()===\"bypassPermissions\"&&this.settings.getAllowDangerouslySkipPermissions" extension.js

    Rollback: cp extension.js.backup extension.js -Force + Reload.
    Hinweis Windows: PowerShell WriteAllText konvertiert LF→CRLF, Delta kann ~50KB statt 158 Bytes sein. Funktional unkritisch, Patch-Count bleibt massgeblich.
    Bisher angewendet: 16.04. (2.1.109), 17.04. (2.1.111), 17.04. 10:35 (2.1.112) bis hin zur aktuellsten Version funktional

  16. dpark2025 commented on May 11, 2026

    @dpark2025

    Just wanted to say the fix put in with 2.1.126 addressed my issues. Hopefully everyone else has had the same experience!

  17. tootony0824 commented on May 14, 2026

    @tootony0824

    Feature Request: Archive background session to Disk instead of hard delete

    Scenario:

    1. User is in Agent View with a background session selected
    2. User presses Ctrl+X, sees a confirmation prompt
    3. User expects the session to be archived to Disk (visible in /resume)
    4. Actual behavior: session is permanently deleted

    Expected:
    When Ctrl+X is used on a background session, it should be archived to Disk so it remains recoverable via /resume, not permanently deleted.

    Alternative:
    If the intent is to remove the session entirely, the confirmation prompt should be more explicit (e.g., "This will permanently delete the session" instead of just "Are you sure?").

    Context:

  18. isaacdavenport commented on Jun 17, 2026

    @isaacdavenport

    Adding a data point for Branch 2 (mid-session reset) with a concrete repro and a testable hypothesis for the mechanism, since most reports here just confirm the symptom.

    Environment

    • Claude Code VS Code extension: anthropic.claude-code-2.1.179-win32-x64
    • VS Code: 1.124.2, x64
    • OS: Windows 11 Pro 10.0.26200
    • ~/.claude/settings.json: permissions.defaultMode: "bypassPermissions"
    • VS Code settings.json: claudeCode.initialPermissionMode: "bypassPermissions"

    Repro timeline (rules out stale-process/cold-boot as the cause)

    1. Full machine reboot, fresh VS Code launch, brand-new conversation.
    2. Wiped the project's .claude/settings.local.json to an empty allowlist, ran a trivial Bash command — no prompt, file stayed clean. Bypass mode working correctly.
    3. Continued working normally in that same session for a while (Read/Write/Edit/Bash calls, a plan-mode round-trip, ordinary feature work — nothing touching permissions).
    4. Significantly later in that same session, with no reload/restart/reboot/settings edit in between, ordinary Bash calls started requiring approval again, and settings.local.json started accumulating one-off literal Bash(...) allow entries.

    Both times this was observed, ~/.claude/settings.json was read back immediately after the symptom appeared and was unchanged and correct — so this isn't a config regression, it's a live/runtime state issue.

    Extra data point: the in-memory state seems to win over the file

    I hand-edited settings.local.json down to a clean wildcard allowlist while the session was running (mid-degradation). The very next approved command reverted the file back to the old bloated list plus one more new entry — suggesting the live extension process holds its own in-memory allow-list state that it unconditionally flushes to disk on every approval, ignoring concurrent on-disk edits.

    Hypothesis (untested, but fits the timeline)

    Per the docs, Claude Code watches settings files and live-reloads them mid-session, explicitly including the permissions key. Combined with the fact that every individually-approved Bash call writes a new entry into the local-scope settings.local.json:

    1. Session starts, bypassPermissions correctly merged from the user scope.
    2. At some point one call slips through to individual approval (possibly itself a separate bug) and a new literal allow rule gets written to the project's settings.local.json (local scope).
    3. That write triggers the documented live reload.
    4. If the reload recomputes effective permissions by treating the freshly-written local allow list as the complete permission set for that scope — instead of correctly re-merging it against the inherited bypassPermissions from the user scope (precedence is local > project > user, so the local scope shouldn't erase the inherited mode, just add to it) — the session loses bypass mode for good. Every subsequent call then requires approval, which writes another entry, triggers another reload, and the session stays degraded from that point on.

    This would explain why it's a one-way ratchet (works until one slip, then stays broken) rather than a flaky toggle, and why @yetiwolf's workaround in #39057 of also setting defaultMode: bypassPermissions directly in settings.local.json mitigates it (it makes the local scope itself re-assert bypass, so the bad re-merge has less to "lose").

    Happy to test a build if there's something specific worth instrumenting (e.g. logging the effective merged permission mode on every reload) — this has been open since #2933 nine months ago and I'd like to help close it out if possible.

  19. isaacdavenport commented on Jun 18, 2026

    @isaacdavenport

    Follow-up to my earlier comment with a useful clue and a longer clean-run data point.

    The VS Code "Allow Dangerously Skip Permissions" setting may be a gate, not an independent toggle

    I'd been treating claudeCode.initialPermissionMode: "bypassPermissions" and
    claudeCode.allowDangerouslySkipPermissions as two separate settings that both happen to need to
    be set. Looking at the actual settings UI just now, the description text under Claude Code:
    Allow Dangerously Skip Permissions
    reads:

    Allow bypass permissions mode. Recommended only for sandboxes with no internet access.

    That phrasing ("Allow bypass permissions mode") reads like this checkbox gates whether bypass
    mode can engage at all
    , rather than being an independent flag. If that's correct, anyone in this
    thread who only set defaultMode: "bypassPermissions" (or only used initialPermissionMode)
    without also enabling this specific VS Code setting may never have had a working bypass mode to
    begin with — which could explain some of the inconsistency across the duplicate reports here (some
    users seeing it "never work," others seeing it work-then-degrade).

    Longest clean run observed so far

    After enabling that checkbox + a full VS Code restart + starting a brand-new conversation, bypass
    mode held completely clean for an entire multi-hour, heavy session — dozens of Bash/SSH/scp/
    git/curl/Edit/Write calls, multiple production deploys, browser automation, npm installs. Zero
    spurious permission prompts (clarifying questions via the agent's own Q&A tool don't count, those
    aren't permission prompts). This is the longest clean run in my own testing of this bug so far —
    prior attempts (plain defaultMode: bypassPermissions, or a reboot alone) degraded mid-session
    within that same day.

    I can't yet rule out it degrading in an even longer session, and I don't have a root-cause
    explanation for why this combination holds where others didn't — but if anyone here hasn't
    explicitly checked this VS Code setting (separate from settings.json), it seems worth verifying
    before concluding bypass mode is unfixably broken for your setup.

    Environment: same as before — anthropic.claude-code-2.1.179-win32-x64, Windows 11 Pro.

  20. carrotRakko commented on Jul 18, 2026

    @carrotRakko

    Adding another branch to this META that I haven't seen called out cleanly: the dangerous rm/rmdir safety check fires under bypassPermissions mode, and there is no opt-out.

    Reproduced on v2.1.214. Any cd <dir> && rm -rf <relative-glob> (e.g. rm -rf .mypy_cache/* after a cd into the worktree) triggers a "Dangerous rm operation on statically-unresolvable target" prompt even with --dangerously-skip-permissions. It fires inside my Docker container just the same as on a host. No flag/setting/env var turns it off. Adding a broad allow rule (e.g. Bash(rm:*)) doesn't override it either — the prompt still fires.

    Strongly identifying with @dginovker — same user profile. My agents are VM-encapsulated; the host is protected by construction. Having bypass mode still prompt on a specific rm pattern is a deal breaker for the same reason: it defeats the purpose of declaring "no prompts."

    I want to name what I keep reading as the implicit justification for these guards (apologies if it's a strawman, but it's worth surfacing): "a user once deleted their home directory, so we hard-block this even in bypass mode." If that's the reasoning, it doesn't justify overriding bypass. The accident happened to someone running on their host. The user who passes --dangerously-skip-permissions has explicitly opted out of that protection, almost always because they've arranged a stronger isolation layer (container/VM/throwaway box) than the guard provides. Penalizing the informed user for the uninformed user's accident is the wrong tradeoff.

    The right shape: design the safety/usability tradeoff deliberately, and let users choose. A bypass that carves out an unkillable exception isn't bypass — it's "bypass except for the things we're nervous about," which is the worst of both worlds (you lose the autonomy and don't gain the safety a real sandbox story would give).

    An opt-out flag for the dangerous-rm check under bypass would resolve this branch cleanly. Happy to file it as a separate feature request if that helps tracking, but it felt like it belonged on the META.

    ✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)

  21. rajivpant commented on Jul 23, 2026

    @rajivpant

    Confirming this persists on 2.1.101 (older than most reports here). New protected-file data point: .claude/launch.json also triggers the guardrail — not previously listed alongside commands/agents/skills/settings.json, so the protected-path list is broader than the nvY snippet above shows. Ruled out the two most common false leads before concluding it's the guardrail: target directory was already in additionalDirectories, and Bash(*) was already an unconditional allow rule — dialog text was 'which is a sensitive file.'

  22. IIvan-On commented on Aug 13, 2026

    @IIvan-On

    Adding a data point that looks related but doesn't fit cleanly into either Branch 1 or Branch 2 above — flagging the distinction in case it's actually a third failure mode, not just more evidence for the existing two.

    Not a protected-directory issue. Our repro involves no .claude/, .git/, .vscode/, or .idea/ paths at all — plain commands like grep, echo, and a heredoc write to /tmp/, none of which touch a protected path. So this doesn't match Branch 1's mechanism.

    Not obviously a mid-session reset either (Branch 2) — our evidence shows the permission mode never resolved to bypassPermissions in the first place, from the very first SDK spawn of a session, not a downgrade partway through.

    Environment

    • Claude Code VS Code extension, reproduced on 2.1.228, re-confirmed still current on 2.1.229 (checked the real CHANGELOG.md for both — no entry mentions defaultMode, bypassPermissions, or permission-mode resolution at spawn/resume)
    • Windows 10 Pro
    • permissions.defaultMode: "bypassPermissions" in project-local .claude/settings.local.json, with non-empty allow/ask/deny arrays in the same file

    Evidence

    The extension's own log (%APPDATA%\Code\logs\<timestamp>\window1\exthost\Anthropic.claude-code\Claude VSCode.log) shows the runtime permission mode never resolves to bypassPermissions, on either a cold spawn or a --resume:

    [info] Spawning Claude with SDK query function - cwd: c:\Users\Ardor\projects, permission mode: default, version: 2.1.228, ..., resume: undefined
    [info] Spawning Claude with SDK query function - cwd: c:\Users\Ardor\projects, permission mode: undefined, version: 2.1.228, ..., resume: <session-id>
    

    ...despite the same log showing the settings file's allow/ask/deny arrays being read and applied correctly moments later:

    [DEBUG] Applying permission update: Adding 40 allow rule(s) to destination 'localSettings': [...]
    [DEBUG] Applying permission update: Adding 12 deny rule(s) to destination 'localSettings': [...]
    [DEBUG] Applying permission update: Adding 10 ask rule(s) to destination 'localSettings': [...]
    

    So this looks like a narrower gap than "settings not read" — the rule arrays load fine, but the defaultMode value from the same file isn't making it into the SDK query's actual runtime mode.

    Confirmed via the permissionDecisionMs field on tool_dispatch_start log lines that this isn't cosmetic — real dialogs fire and sit waiting for a manual click, for commands that match none of the documented bypass exceptions (no ask rule, not a protected path, not an MCP tool needing interaction):

    Command Ask-listed? permissionDecisionMs
    grep -n "test" /dev/null; echo "..." No 13,583
    Heredoc write to /tmp/... No 12,563
    Heredoc write to /tmp/... (via a subagent) No 17,269
    echo ... > /tmp/... No 16,362

    (Subagents showed identical behavior to the main session — not subagent-specific.)

    Update from a later same-day session: looks tool-type-specific, not uniform

    A follow-up session testing this same setup found something more precise: Edit, Write, and an MCP tool call triggered zero dialogs, while Bash calls triggered every single time, in the same window, same time period:

    Call type permissionDecisionMs observed
    Write (3 calls) 6, 7, 4
    Edit (2 calls) 2, 2
    One MCP tool call 0
    Bash (11 calls, same session) 4379, 28466, 16316, 61837, 123266, 31788, 5923, 9853, 17394, 48236, 162948

    Single-digit ms = no real dialog (matched instantly). The Bash numbers are real, manually-resolved dialogs — one took nearly 3 minutes. This doesn't contradict the earlier finding (Edit/Write did prompt at least once in the original evidence-gathering session, hours earlier) — it suggests the manifestation may vary by tool type and/or session state over time, not a single static condition. Flagging as an open question rather than a firm conclusion.

    Already ruled out

    • Not a stale/pre-edit session — confirmed via the process's own start time vs. the settings file's mtime (session started ~8.5h after the edit)
    • Not a rule-matching gap — the affected commands match no ask/deny rule of any kind, so there's nothing for bypassPermissions to need to resolve against
    • Not a duplicate/second running session — only one CLI harness process was running, matching the affected session's own ID
    • No competing claudeCode.* setting in VS Code's own User/settings.json overriding the project file
  23. robster7674 commented on Aug 20, 2026

    @robster7674

    Adding a data point to this meta-issue, since it's a slightly different angle from most of the branches already tracked here (protected-dirs and mid-session mode resets): a fresh-session launch-time override that two closed-as-duplicate/not-planned issues already root-caused separately, but which I don't see cross-linked from here — #62205 and #55095.

    Environment: VSCodium (not official VS Code) native extension, anthropic.claude-code-2.1.233-linux-x64, Linux.

    What I confirmed directly on my own machine, not just from those issues:

    1. ~/.claude/settings.json still correctly has the setting that's supposed to control this:

      {
        "permissions": { "allow": [ /* ... */ ] },
        "model": "sonnet",
        "defaultMode": "bypassPermissions"
      }

      (Note it's set at the top level, not nested under permissions.defaultMode — not sure if that's the expected schema location or itself part of the problem; [FEATURE] Include bypassPermissions mode in default Shift+Tab permission mode cycling #21062 references permissions.defaultMode specifically.)

    2. ~/.claude.json does contain a live, populated cachedGrowthBookFeatures block (dozens of tengu_*-prefixed flags), confirming the server-sync mechanism [BUG] Root cause identified: GrowthBook A/B flags tengu_permission_friction + tengu_quill_harbor silently override defaultMode:bypassPermissions via periodic server sync — macOS Desktop #62205 describes is genuinely active on this install — I did not specifically confirm the two flag names [BUG] Root cause identified: GrowthBook A/B flags tengu_permission_friction + tengu_quill_harbor silently override defaultMode:bypassPermissions via periodic server sync — macOS Desktop #62205 names (tengu_permission_friction, tengu_quill_harbor) are among them, since the file is large and I only inspected a partial dump, but the sync mechanism itself is real, not hypothetical.

    3. ps aux right now shows a clear split on the same machine, same user, same settings.json: older long-running sessions launched with

      ... claude ... --permission-mode bypassPermissions --allow-dangerously-skip-permissions ...
      

      still work fine, while sessions started more recently launch as

      ... claude ... --permission-mode auto ...
      

      with no bypass flag at all, despite identical settings.json. Strongly suggests whatever overrides this is applied at launch time server-side, not read fresh from local config, and isn't retroactive to already-running processes.

    4. The VSCodium extension's own package.json does declare claudeCode.allowDangerouslySkipPermissions (boolean, scope: machine) and claudeCode.initialPermissionMode as real, documented contribution points — and mine is set to true/bypassPermissions respectively in VSCodium's user settings — but new sessions from this extension still don't launch with bypass, consistent with Bypass permissions mode no longer appears in session UI on Claude Code Desktop (Mac) despite Settings toggle being enabled #55095's finding that the toggle "appears to have no effect."

    Timing-wise this lines up for me with the platform-wide auto-mode-becomes-default rollout — I got an in-app notice about that right before this started happening.

    Happy to provide more detail if useful. Referencing this from the meta-issue given #62205 and #55095 are the more specific root-cause writeups but are closed and not currently linked from here.

  24. robster7674 commented on Aug 24, 2026

    @robster7674

    Update, 4 days later: recurred again on the same machine/environment as my comment above, same extension version (2.1.233), no local config changes since. Fresh timestamped evidence this time:

    Environment: VSCodium (not official VS Code) Remote-SSH — client on macOS/Apple Silicon, remote extension host on Linux x86_64 (anthropic.claude-code-2.1.233-linux-x64).

    • ps aux at the moment it happened shows a clean split by process-start-time: sessions launched before 09:36 UTC today carry --permission-mode bypassPermissions --allow-dangerously-skip-permissions; sessions launched at 09:36:20 and 09:36:50 carry --permission-mode auto with no bypass flag at all — same settings.json, same VSCodium user settings, unmodified since 08-21 and 06-14 respectively.
    • ~/.claude.json's mtime is 09:36:53 — within the same minute as the downgraded launches — which is the first time I've been able to catch the GrowthBook sync landing at essentially the same moment a fresh session gets silently overridden to auto.
    • Confirming what I could only guess at last time: cachedGrowthBookFeatures does contain tengu_permission_friction: true and tengu_quill_harbor: "acceptEdits", alongside tengu_auto_mode_default_on: false and a populated tengu_auto_mode_config block.

    Recurring, intermittent, and still not tied to any local config or version change on my end — seems consistent with a server-side flag flip rather than anything client-side.

  25. robster7674 commented on Sep 10, 2026

    @robster7674

    Update, 2026-09-10, ~2.5 weeks after my last comment: recurring again, same machine/environment, and this time with a UI symptom worth adding: the mode picker doesn't just default away from bypass — "Bypass permissions" isn't listed as an option at all, only Manual / Edit automatically / Plan / Auto.

    Environment: VSCodium Remote-SSH — client macOS/Apple Silicon, remote extension host Linux x86_64, now anthropic.claude-code-2.1.251-linux-x64 (up from 2.1.233 last time).

    • ~/.claude/settings.json is unchanged since my last comment: "defaultMode": "bypassPermissions" still present at top level.
    • ps aux right now shows the same clean split by launch time as before: sessions started Sep 4 and Sep 8 still carry --permission-mode bypassPermissions --allow-dangerously-skip-permissions; every session started today (05:54 and 06:19 UTC) carries --permission-mode acceptEdits, no bypass flag at all — identical settings.json across all of them.
    • cachedGrowthBookFeatures in ~/.claude.json again has tengu_permission_friction: true and tengu_quill_harbor: "acceptEdits" — same two flags I confirmed on 2026-08-24, still present today.
    • One difference from last time: ~/.claude.json's mtime (06:28:51 UTC) trails after today's downgraded launches (05:54, 06:19) rather than landing in the same minute as a launch — so either the flag was already flipped before I checked, or the sync isn't the only trigger. Not conclusive, just noting it doesn't perfectly match my earlier "caught it in the act" evidence.

    Still nothing here tying the downgrade to a local config or version change — consistent with a server-side flag rather than a client regression. No maintainer response on this meta-issue since it was opened in March.

  26. robster7674 commented on Oct 10, 2026

    @robster7674

    Update, 2026-10-10 — recurred a third time, now on 2.1.284 (up from 2.1.251 / 2.1.233). Same VSCodium Remote-SSH setup (macOS/Apple Silicon client, Linux x86_64 extension host), no local config change on my side: ~/.claude/settings.json still has "defaultMode": "bypassPermissions" at top level and "skipDangerousModePermissionPrompt": true.

    • The session mode picker (screenshot attached to my earlier report: same list) offers only Manual / Edit automatically / Plan / Auto. "Bypass permissions" is not listed, and the session sits on "Edit automatically".
    • ps at 07:39 UTC shows three extension-spawned claude processes launched within 30 s of each other (07:38:04, 07:38:16, 07:38:31). Two carry --permission-mode bypassPermissions; one carries --permission-mode acceptEdits. All three carry --allow-dangerously-skip-permissions.

    New vs. my 2026-09-10 report: the CLI is now launched with --allow-dangerously-skip-permissions, so the flag being missing is not the whole story. The webview picker still drops the Bypass option, and a fresh session can still start in acceptEdits despite the same settings. This looks like the same launch-time/webview override as #62205 and #55095, not a settings problem. Workaround for now: restart the affected tab, or start the session from the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions