[Bug] /diff command incompatible with worktrees
Status Open
Reported on v2.1.280
Maintainer reply None cached
Activity 3 comments · opened Sep 23, 2026
Bug Description
/diff doesn't work with worktrees.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.280
- Feedback ID: 7d40f0e5-53c2-4b97-8b4f-87ef860fd6e9
Errors
[]
3 Comments
Repro steps that worked for me:
git worktree addclaudein the secondary worktree/diffin the Claude Code instance.The diff pane should open, with a message:
It is not specific to macos. I have the same issue on linux ubuntu. It looks like the /diff show the diff of the master worktree in my case.
My case is maybe more related to https://github.com/anthropics/claude-code/issues/89395.
I launch claude agents from the root worktree, from there I launched a separate agents with its own worktree. When attaching terminal to this agent (enter on the session from the sessions view), the /diff view stay on the root worktree.
Running a separate claude from the worktree dir, or even claude --worktree from the root show the diff