Tool permissions not recognized when running commands in git worktrees
Resolved 💬 8 comments Opened Dec 3, 2025 by tonyjoblin Closed Feb 3, 2026
Description
When working in a git worktree (e.g., ../worktrees/feature-branch), commands that should be auto-approved based on the main project's permission settings still prompt for approval. The permission system appears to check against the original project path rather than recognizing the worktree as part of the same project.
Steps to Reproduce
- Have a project at
/Users/user/src/projectwith certain Bash commands configured as auto-approved (e.g.,bin/rails test:*) - Create a git worktree:
git worktree add ../worktrees/feature-branch - In Claude Code, work in the worktree directory
- Run an auto-approved command like
bin/rails test test/models/some_test.rbin the worktree - Bug: Permission is requested, referencing the original project path (
./) instead of the worktree path
Expected Behavior
Commands run in a git worktree should inherit the permission settings from the main project, since worktrees share the same .git configuration and are part of the same repository.
Actual Behavior
- Permission prompts appear for commands that should be auto-approved
- The permission prompt references the original project directory (
./) rather than the worktree path (../worktrees/...)
Impact
This breaks the workflow when using git worktrees for parallel development, requiring repeated manual approvals for routine commands.
Environment
- Claude Code CLI
- macOS
- Git worktrees feature
🤖 Generated with Claude Code
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗