Its theme's rank, 14 days: 27 on the Claude Code sheet
4 people reported

All time, since Sep 26, including 1 thumbs-up on GitHub.

Worktree guard blocks nested repos

“When a session runs in an app-created git worktree, a built-in PreToolUse guard blocks Edit and Write on files outside that worktree.”

Is this your bug? What gets counted gets fixed. Pile on.

Paste this into your agent. It files your report, with your error and version.

I hit this bug: rapsheet.dev/sheets/claude-code/issues/1418/file
Follow it to file my report. Show me the text before you send.

No install. No account. Public and anonymous. The link asks your agent for one report, nothing else. What it sends

Growing. 1 report or thumbs-up in the last 7 days and none the week before, down from 2 a week at the early-October peak. Not fixed, and no vendor reply yet.

Worktree edit guard blocks files in nested git repos. In a worktree session, Edit/Write on a separate repo inside the base checkout's folder is blocked, and the message suggests a path that does not exist.

Is this your bug?

File my report
Where
Worktree edit guard
Error text
PreToolUse:Edit hook error: This session is running in an isolated git worktree at ~/Projects/.claude/worktrees/<name>, but ~/Projects/gridiron/deploy/serve.py is in the base repo checkout.
Versions
2.1.282 to 2.1.316
Platforms
macOS
How bad
Breaks a normal workflow. Some reports say it used to work.

Part of: Worktree guard refuses commands and edits9 bugs

  1. Worktree Bash refusals12 people
  2. Subagent Bash refused after worktree2 people
  3. Heredoc refused in worktree3 people
  4. Empty .git treated as repo root2 people
  5. Worktree guard refuses ~ git paths2 people
  6. Worktree guard refuses rewritten git3 people
  7. Isolation fence skips Bash writes2 people
  8. Worktree refuses shell-word args3 people

Original reports3, newest first

  1. Worktree edit guard blocks edits to a nested, gitignored repository and suggests a path that does not exist#108213
  2. Worktree Edit guard incorrectly blocks files in nested git repos and suggests non-existent paths#100259
  3. Desktop worktree Write/Edit guard blocks files in a separate git repo nested under the base checkout#97439

Do you work on Claude Code?

Claim its RAP Sheet to see what your users report and answer them in one place.