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
- Create a git worktree inside the project (worktree CWD:
<project>/.claude/worktrees/<name>) - The worktree has its own
.claude/settings.json(copied from the main project), which definespermissions.allowwithoutRead/Glob/Grep - The worktree does not have a
.claude/settings.local.json - Start a Claude Code session in the worktree
- Trigger a subagent (e.g., Explore) that uses
Read - 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),
Readworks without prompting even though neither the project.claude/settings.jsonnor.claude/settings.local.jsonincludeRead. This confirms the globalReadpermission is inherited — arrays merge as expected. - In the worktree,
Readprompted. 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.jsonexists (nor does one exist for the main project path).
Possible Causes Considered
- Array replace vs merge: Ruled out — if arrays replaced, Read would also fail in the main project (it doesn't).
- Missing
settings.local.jsonin worktree: The main project'ssettings.local.jsonwasn't being copied to worktrees. However, neither file containsRead, so this alone doesn't explain the issue. ~/.claude/projects/user-level settings keyed by path: Both the main project and worktree lack asettings.local.jsonin this directory, so this isn't the differentiator.- 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.gitignoreentry for.claude/worktrees/affects settings discovery. - 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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗