Show active worktree branch in status bar instead of root repo branch

Resolved 💬 4 comments Opened Mar 27, 2026 by lexywiesexy-hot Closed Apr 27, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem

When working in a git worktree (via git worktree add), the Claude Code
status bar always shows the branch of the root repository, not the
branch of the worktree the session is actually working in.

Example:

  • Root repo is on codex/codexBranch
  • Claude is working in .claude/worktrees/claudeBranch/ on branch claude/claudeBranch
  • Status bar shows: Branch ← codex/codexBranch
  • Should show: Branch ← claude/claudeBranch

Why this matters

Worktrees are essential for parallel AI workflows — e.g. Claude Code and
OpenAI Codex working simultaneously on different branches without collisions.
When multiple sessions are active, it's critical to know which branch Claude
is actually operating on.

Related: #22615

Proposed Solution

Suggested fix

Run git rev-parse --abbrev-ref HEAD from the actual working directory
(which may be a worktree), not from the root repo path.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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