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

Resolved 💬 7 comments Opened Mar 21, 2026 by Kretsche49 Closed May 15, 2026

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
  • 2. Yes, allow all edits during this session (shift+tab)
  • 3. No
  1. 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)

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗