allowedTools permissions not applied in git worktrees — Edit/Write still prompt for approval

Resolved 💬 3 comments Opened Apr 13, 2026 by HenriGeorge Closed Apr 16, 2026

Description

allowedTools permissions set in .claude/settings.json (project-level, checked into git) are not honored when Claude Code runs inside a git worktree. The Edit/Write tools still prompt for user approval despite being explicitly allowed.

Reproduction

  1. In main repo, set .claude/settings.json:
{
  "permissions": {
    "allow": ["Bash(*)", "Read(*)", "Write(*)", "Edit(*)", "Glob(*)", "Grep(*)"]
  }
}
  1. Create a git worktree:
git worktree add /path/to/worktree feature-branch
  1. Open Claude Code in the worktree directory:
cd /path/to/worktree && claude
  1. Claude tries to use the Edit tool → permission prompt appears despite Edit(*) being in settings

Expected Behavior

Edit/Write should run without prompting, matching behavior in the main repo checkout.

Actual Behavior

The permission prompt appears on every Edit/Write call. Pressing Shift+Tab to "always allow" does not persist across tool calls during rapid edit cycles.

Additional Context

  • The worktree has its own copy of .claude/settings.json (checked into git on the branch) with the same Edit(*) permission
  • No settings.local.json exists in the worktree
  • Global ~/.claude/settings.json also has Edit(*)
  • The permission is set at all 3 levels (global, project, local) and still not applied
  • PreToolUse hooks pass correctly (they only block on the default branch, and the worktree is on a feature branch)
  • This affects multi-agent workflows where agents work in parallel worktrees

Environment

  • Claude Code: 2.1.84
  • OS: macOS 15 (Darwin 25.4.0)
  • Node: v25.6.1
  • Git worktrees created via git worktree add
  • Multiple worktrees active simultaneously

View original on GitHub ↗

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