Worktree paths trigger excessive permission prompts even with accept-all-edits enabled

Resolved 💬 3 comments Opened Mar 20, 2026 by TimZander Closed Mar 24, 2026

Problem

When working in a git worktree (e.g., created via git worktree add or Claude Code's worktree isolation mode), file read and write operations trigger permission prompts even when "accept all edits" is enabled.

This likely happens because worktree paths resolve outside the original project directory (e.g., .git/worktrees/... or a sibling directory), so the permission system treats them as external paths requiring explicit approval.

Expected behavior

When "accept all edits" is enabled, file operations within a worktree of the current project should be auto-approved, just like operations in the main working directory. The worktree is still the same repository — it should inherit the same permission context.

Steps to reproduce

  1. Open a project in Claude Code with "accept all edits" enabled
  2. Create or enter a git worktree (e.g., via the Agent tool with isolation: "worktree", or manually via git worktree add)
  3. Ask Claude to read or edit files in the worktree
  4. Observe: permission prompts appear for each file operation despite accept-all-edits being enabled

Impact

The repeated prompts make worktree-based workflows (isolated agent work, parallel branch exploration) significantly slower and more disruptive than working in the main tree. This undermines the value of worktree isolation as a safe, parallel workflow.

View original on GitHub ↗

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