2 people reported

All time, since Oct 5.

Empty .git treated as repo root

“Claude Code treats an empty .git directory as a git repository root, though git does not.”

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

Empty .git directory treated as repository root, breaking trust and worktree guard. Claude Code stops at an empty .git directory that git itself ignores, so the folder-trust prompt reappears and writes under /tmp are refused.

Is this your bug?

File my report
Where
project root detection
Error text
Edit the worktree copy of this file
Versions
2.1.289 to 2.1.308
Platforms
Linux
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. 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

Not quite your bug?

  1. Sandbox placeholder files in .git2 people
  2. Worktrees report workspace not trusted4 people

Original reports2, newest first

  1. An empty .git directory in a subfolder is treated as a repository root, so the folder-trust prompt reappears inside a trusted repo#104937
  2. Worktree guard fences all of /tmp when /tmp holds any .git entry (empty dir accepted as a repo root; resumed background sessions anchor under /tmp)#99567

Do you work on Claude Code?

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