Session header shows branch from sibling checkout instead of session's working directory
Open 💬 0 comments Opened Jun 11, 2026 by SteveM74
Description
The session header (and branch indicator in the UI) shows a branch from a sibling git checkout in the parent directory, not the branch of the session's actual working directory.
Steps to reproduce
- Have multiple git checkouts under a common parent folder, e.g.:
````
Gallantree Platform/
platform-2.0/ ← session working directory (branch: main)
platform-e2e-phase-3/ ← separate full checkout (branch: feat/e2e-phase-3)
- Start a Claude Code session rooted at
platform-2.0 - Observe the session header — it shows
feat/e2e-phase-3instead ofmain
Expected behaviour
The branch shown in the session header should reflect the branch of the session's working directory (main in the example above).
Actual behaviour
The app scans the surrounding directory tree, finds a sibling git repo, and surfaces its branch in the session header — overriding or competing with the correct branch for the active session.
Environment
- Platform: Windows 11
- Shell: PowerShell / Git Bash
- Working directory: a repo with multiple git worktrees and sibling checkouts in the parent folder