bypassPermissions resets to acceptEdits when editing files under nested .claude/ directories

Resolved 💬 6 comments Opened Mar 20, 2026 by Beardeadbear Closed May 27, 2026

Description

When working in a monorepo with multiple nested .claude/ directories (git subtree packages), editing any file under a package's .claude/ directory causes the permission mode to reset from bypassPermissions to acceptEdits.

Steps to Reproduce

  1. Create a monorepo with multiple packages, each containing their own .claude/settings.json:

``
.claude/settings.json # root — defaultMode: "bypassPermissions"
packages/pkg-a/.claude/settings.json # subtree — defaultMode: "bypassPermissions"
packages/pkg-b/.claude/settings.json # subtree — defaultMode: "bypassPermissions"
packages/pkg-c/.claude/settings.local.json # local override
``

  1. Launch Claude Code from the monorepo root in bypassPermissions mode
  2. Edit any file under a nested .claude/ directory (e.g., packages/pkg-a/.claude/hooks/some-hook.js or packages/pkg-b/.claude/settings.json)
  3. Observe that permission mode switches to acceptEdits

Expected Behavior

Permission mode should remain bypassPermissions since all settings.json files have "defaultMode": "bypassPermissions" set.

Actual Behavior

Permission mode resets to acceptEdits after the edit. This happens consistently on every edit to any file under a nested .claude/ directory.

Analysis

  • The issue does NOT occur in standalone repos with a single .claude/ directory
  • All 7 settings.json files in the project have "defaultMode": "bypassPermissions" — the reset happens regardless
  • Adding "defaultMode": "bypassPermissions" to a settings.local.json does not prevent it
  • The file watcher appears to detect changes under any .claude/ path in the project tree and triggers a settings reload, which resets the permission mode to the default (acceptEdits)

Environment

  • Claude Code version: 2.1.80
  • OS: macOS (Darwin 25.3.0)
  • Model: claude-opus-4-6
  • Repo structure: monorepo with git subtree packages, each bringing their own .claude/ directory

Workaround

None — the user must manually re-enable bypass mode after each edit to a .claude/ file. This is especially disruptive in monorepos where framework packages contain hooks, skills, and agent definitions under .claude/ that are frequently edited.

View original on GitHub ↗

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