Skip to content

git-branch status_line item omitted on Windows linked worktree #22120

@RonsonNamek

Description

@RonsonNamek

What happened?

git-branch in tui.status_line is omitted on Windows when Codex is launched inside a linked git
worktree.

Environment

  • Codex CLI: 0.130.0
  • OS: Windows
  • Shell: PowerShell
  • Launch command:
codex -C D:\Repositories\lpsrc_mirror3

### Config

[tui]
status_line = ["model-with-reasoning", "git-branch", "run-state", "context-used", "codex-version",
"context-window-size"]
status_line_use_colors = true

### Actual behavior

The status line renders every configured item except git-branch:

gpt-5.5 xhigh · Ready · Context 69% used · 0.130.0 · 258K window

Using a minimal status line:

codex -C D:\Repositories\lpsrc_mirror3 -c 'tui.status_line=["git-branch","run-state"]'

git-branch is still omitted.

### Git works correctly from the same directory

git -C D:\Repositories\lpsrc_mirror3 rev-parse --show-toplevel
git -C D:\Repositories\lpsrc_mirror3 branch --show-current
git -C D:\Repositories\lpsrc_mirror3 status --short -b

Output:

D:/Repositories/lpsrc_mirror3
vs_2026/dev3
## vs_2026/dev3

### Worktree .git file

gitdir: D:/Repositories/lpsrc/.git/worktrees/lpsrc_mirror3

### Expected behavior

git-branch should display:

vs_2026/dev3

### Notes

This looks related to Windows/worktree git detection. Similar issues exist around Windows, WSL, and
worktrees, but I could not find an exact report for the CLI tui.status_line git-branch item being
omitted in a Windows linked worktree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions