Skip to content

Edit tool prompts for permission despite bypassPermissions mode + --dangerously-skip-permissions flag #37181

Closed as not planned

Description

@Kretsche49

Bug Description

The Edit tool intermittently prompts for permission ("Do you want to make this edit?") despite all permission bypass settings being correctly configured. This happens mid-conversation — permissions work correctly at the start, then at some point switch to "acceptEdits" mode.

Critical observation: When this switch happens in one terminal window, it happens across ALL open Claude Code windows simultaneously shortly after, suggesting a shared runtime state issue rather than a per-session problem.

Environment

  • Claude Code version: 2.1.81
  • OS: macOS (Darwin 24.6.0)
  • Shell: zsh
  • CLI flag: --dangerously-skip-permissions

Configuration (verified correct on all 3 levels)

Global (~/.claude/settings.json)

{
  "permissions": {
    "allow": ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "WebFetch", "WebSearch", "Agent", "NotebookEdit", "Skill", "mcp__comet-bridge__*", "mcp__firefoxbrowser__*"],
    "defaultMode": "bypassPermissions"
  },
  "skipDangerousModePermissionPrompt": true,
  "skipAutoPermissionPrompt": true,
  "hooks": {
    "PermissionRequest": [{
      "hooks": [{
        "type": "command",
        "command": "bash ~/.claude/hooks/auto-approve-all.sh"
      }]
    }]
  }
}

Project (.claude/settings.json) — same allow list + bypassPermissions

Project-local (.claude/settings.local.json) — same allow list + bypassPermissions + same hook

auto-approve-all.sh hook

#!/bin/bash
cat > /dev/null &
echo '{"hookSpecificOutput":{"hookEventName":"PermissionRequest","permissionDecision":"allow","permissionDecisionReason":"auto-approved by hook"}}'
exit 0

Reproduction

  1. Open multiple Claude Code sessions with --dangerously-skip-permissions
  2. All tools (Bash, Write, Read, Glob, Grep, Agent, TaskCreate, etc.) work without permission prompts
  3. At some point during a conversation, the Edit tool starts showing "Do you want to make this edit?" with options:
      1. Yes
      1. Yes, allow all edits during this session (shift+tab)
      1. No
  4. Shortly after this happens in one window, ALL other open Claude Code windows also start prompting for Edit permissions

Expected Behavior

Edit tool should never prompt for permission when bypassPermissions is the defaultMode, Edit is in the allow list, --dangerously-skip-permissions is active, and the PermissionRequest hook returns allow.

What I've Verified

  • No managed/enterprise settings overriding
  • No project-level settings in ~/.claude/projects/
  • Settings files are NOT being modified at runtime (checked timestamps)
  • All other tools bypass correctly — only Edit is affected
  • Context window usage was only ~24% when the issue occurred (not context compression)
  • This is NOT a one-time issue — it happens reproducibly in every longer session

Screenshot

The Edit tool prompting despite bypass mode:

Edit permission prompt despite bypass

(Edit tool showing "Do you want to make this edit?" dialog with 3 options while running in --dangerously-skip-permissions mode)

Activity

  1. Kretsche49 commented on Mar 21, 2026

    @Kretsche49
    Author

    Additional Critical Detail

    The issue is worse than initially described:

    Selecting option 2 ("Yes, allow all edits during this session") does NOT persist. The user reports that after selecting this option, another permission prompt appears ~10 seconds later for the next Edit call, and then another, and another — in an endless loop. The "allow all edits during this session" setting is effectively ignored or constantly reset.

    This means:

    1. bypassPermissions mode is ignored
    2. --dangerously-skip-permissions flag is ignored
    3. Edit in the allow list is ignored
    4. The PermissionRequest hook (returning allow) is ignored
    5. Even the in-session "allow all edits" selection is ignored

    The user has to manually approve every single Edit call, making Claude Code essentially unusable for any task involving file modifications.

    Combined with the cross-window synchronization of the bug (when it starts in one terminal, all terminals are affected simultaneously), this suggests the permission state is being actively overwritten by some internal process at runtime.

  2. github-actions commented on Mar 21, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. --dangerously-skip-permissions does not bypass Edit permission prompts #36192
    2. VS Code: Edit tool prompts for permission despite bypassPermissions mode #36219
    3. bypassPermissions resets to acceptEdits when editing files under nested .claude/ directories #36624

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  3. Kretsche49 commented on Mar 21, 2026

    @Kretsche49
    Author

    Screenshot

    Here is the bug in action — Edit tool prompting for permission on test_stp_manager.py despite --dangerously-skip-permissions flag being active (visible in all terminal tabs):

    Edit permission prompt despite bypass mode

    Note: The --dangerously-skip-permissions flag is visible in multiple terminal tabs at the top of the screen. Yet the Edit tool still shows "Do you want to make this edit to test_stp_manager.py?" with the 3-option dialog.

  4. ddarbyson commented on Mar 22, 2026

    @ddarbyson

    Similar reported bug - #11380 (comment)

    Seems to be recent as of the last week or so.

  5. Steviey commented on Apr 4, 2026

    @Steviey

    +1 Rightsmanagement is an absolute mess. If this is security then...good luck!

  6. github-actions commented on May 15, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  7. github-actions commented on Jul 5, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  8. locked as resolved and limited conversation to collaborators on Jul 5, 2026
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

    area:permissionsbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions