claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] accept edits not working with worktree inside .git

Open dvic opened this issue 1 month ago • 2 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using worktrees stored in .git/..... (for example when using https://github.com/aku11i/phantom) then the accept edits feature is not working, every edit needs to be manually approved!

What Should Happen?

It should work like any other folder.

Error Messages/Logs


Steps to Reproduce

  1. create a worktree inside .git/phantom/worktrees
  2. ask 'write a poem about ai in poem.txt' with accepts edit on

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

v2.0.33

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

dvic avatar Nov 05 '25 13:11 dvic

See #9348

softwarecatscomgm avatar Nov 20 '25 16:11 softwarecatscomgm

I am using worktrees in my general setup when working with git. And I am experiencing this issue from who knows when.

hllvc avatar Dec 06 '25 20:12 hllvc