[Bug] Claude Code does not update branch context when Git branch changes during session

Resolved 💬 3 comments Opened Jan 16, 2026 by RRaffay Closed Jan 20, 2026

Bug Description
One thing I've noticed is that when I open a Claude Code session in a branch and during the session change the branch and ask claude code about branch context, it seems to assume I'm in the earlier branch. For example, started a session, did some work in a new branch and raised a pr for the new branch, and ask claude to fetch gh comments for the pr, it assumes I'm in the original branch.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.9
  • Feedback ID: 450ee053-5376-470d-a83c-b3f63b88955d

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/ranaraffay/.local/share/claude/versions/2.1.9 (expected in multi-process scenarios)\n    at BER (/$bunfs/root/claude:3355:2091)\n    at HFA (/$bunfs/root/claude:3355:1202)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-16T22:27:19.097Z"}]

View original on GitHub ↗

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