Read/Glob/Grep allowed in global settings but still prompts in git worktrees

Resolved 💬 4 comments Opened Mar 25, 2026 by fesilvajacquier Closed May 3, 2026

Bug Description

Read, Glob, and Grep are allowed in my global ~/.claude/settings.json, but I get permission prompts for these tools when running inside a git worktree.

Environment

  • Claude Code version: 2.1.83
  • OS: Ubuntu Linux (6.17.9)
  • Shell: zsh

Settings Configuration

Global ~/.claude/settings.json (excerpt)

{
  "permissions": {
    "allow": [
      "Read",
      "Glob",
      "Grep",
      "Bash(git:*)",
      ...
    ]
  }
}

Project .claude/settings.json (excerpt)

{
  "permissions": {
    "allow": [
      "Bash(git:*)",
      "Bash(gh:*)",
      ...
    ]
  }
}

Note: the project settings define their own permissions.allow array but do not include Read, Glob, or Grep.

Project .claude/settings.local.json

Also has a permissions.allow array without Read, Glob, or Grep.

Reproduction Steps

  1. Create a git worktree inside the project (worktree CWD: <project>/.claude/worktrees/<name>)
  2. The worktree has its own .claude/settings.json (copied from the main project), which defines permissions.allow without Read/Glob/Grep
  3. The worktree does not have a .claude/settings.local.json
  4. Start a Claude Code session in the worktree
  5. Trigger a subagent (e.g., Explore) that uses Read
  6. Result: Permission prompt appears for Read(app/models/some_file.rb)

Expected Behavior

Read is allowed in global settings → it should be allowed in all projects and worktrees, regardless of whether the project/local settings define their own permissions.allow array.

What I Verified

  • In the main project (non-worktree), Read works without prompting even though neither the project .claude/settings.json nor .claude/settings.local.json include Read. This confirms the global Read permission is inherited — arrays merge as expected.
  • In the worktree, Read prompted. The only difference is the CWD path (<project>/.claude/worktrees/<name> vs <project>).
  • The worktree is a proper git worktree with its own .claude/settings.json (same content as the main project's).
  • No ~/.claude/projects/<worktree-path>/settings.local.json exists (nor does one exist for the main project path).

Possible Causes Considered

  1. Array replace vs merge: Ruled out — if arrays replaced, Read would also fail in the main project (it doesn't).
  2. Missing settings.local.json in worktree: The main project's settings.local.json wasn't being copied to worktrees. However, neither file contains Read, so this alone doesn't explain the issue.
  3. ~/.claude/projects/ user-level settings keyed by path: Both the main project and worktree lack a settings.local.json in this directory, so this isn't the differentiator.
  4. Worktree path inside .claude/: The worktree lives at <project>/.claude/worktrees/<name>. This is inside the .claude/ directory of the parent project. It's possible the permission resolution treats this path differently, or the .gitignore entry for .claude/worktrees/ affects settings discovery.
  5. Subagent-specific permission inheritance: The prompts occurred inside an Explore subagent (running haiku). It's possible subagents in worktrees don't correctly inherit the global permission allow list.

Workaround

Adding Read, Glob, Grep explicitly to the project .claude/settings.json should work, but defeats the purpose of having global settings.

View original on GitHub ↗

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