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

All time, since Oct 6, including 1 thumbs-up on GitHub.

Worktree guard refuses rewritten git

“In a worktree-isolated session, the model writes a plain git command, but the guard refuses it.”

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/3835/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

Worktree guard refuses git commands rewritten by PreToolUse hook. In worktree-isolated sessions, a PreToolUse hook wrapping git in rtk leads the guard to refuse a command the agent typed as plain git.

Is this your bug?

File my report
Where
Worktree isolation guard
Error text
This agent is isolated in the worktree `<worktree>`, but this command runs rtk with a git command among its operands: what runs it, and from which directory or root, cannot be read here ... Refusing to run it.
Versions
2.1.291 to 2.1.318
Platforms
macOS
How bad
Breaks a normal workflow.

Part of: Worktree guard refuses commands and edits9 bugs

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

Original reports2, newest first

  1. Worktree guard refuses hook-rewritten rtk git#107244
  2. Worktree-isolation guard refuses plain git commands after a PreToolUse hook wraps them in a launcher (rtk)#99895

Do you work on Claude Code?

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