[Bug] Claude switches from worktree to main branch after plan acceptance

Resolved 💬 3 comments Opened Mar 9, 2026 by arjunven Closed Mar 9, 2026

Bug Description
When in a worktree and a plan gets accepted claude appears to switch back to main isntead of staying in the worktree. This appears to have started happening after an update in the last week or so. And it tries to make all the changes slated for the worktree on main. If i have 2
worktrees or more and this occurs it's chaos. And then each session has to undo its intertwined changes which then nuke another sessions changes. It's a mess.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.71
  • Feedback ID: ff824366-cfa3-4357-8562-a690f4b6bd37

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/arjun/.local/share/claude/versions/2.1.71 (expected in multi-process scenarios)\n    at Xxq (/$bunfs/root/src/entrypoints/cli.js:2603:2066)\n    at zU8 (/$bunfs/root/src/entrypoints/cli.js:2603:1210)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-08T19:53:54.145Z"},{"error":"Error: Request was aborted.\n    at o0q (/$bunfs/root/src/entrypoints/cli.js:1125:67385)\n    at next (native:1:11)\n    at L29 (/$bunfs/root/src/entrypoints/cli.js:6204:6833)\n    at next (native:1:11)\n    at C29 (/$bunfs/root/src/entrypoints/cli.js:6209:9195)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-09T02:47:41.899Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗