Session header shows branch from sibling checkout instead of session's working directory

Status Closed — not planned
Maintainer reply None cached
Activity 1 comment · opened Jun 11, 2026 · closed Jul 21, 2026

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

  1. 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)
``

  1. Start a Claude Code session rooted at platform-2.0
  2. Observe the session header — it shows feat/e2e-phase-3 instead of main

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

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗