[BUG] Desktop app: git branch chip shows "—" and is not clickable for WSL workspaces

Status Closed — duplicate
Reported on v2.1.227
Maintainer reply None cached
Activity 2 comments · opened Aug 11, 2026 · closed Aug 15, 2026

Summary

In the Claude Code desktop app on Windows, when the workspace is a folder inside a WSL2 distro, the git branch chip in the workspace chip row renders as (em dash) instead of the branch name. The chip is not clickable, so there is no way to view or switch branches from the UI. The adjacent worktree checkbox is likewise inert.

The underlying git state is completely healthy — only the UI fails to surface it.

Current behavior

The chip row renders as:

⌧ Ubuntu-20.04  │  🗀 my-repo  │  ⎇ —  │  ☐ worktree
  • The branch chip shows and is non-interactive (no branch picker opens on click).
  • The worktree checkbox does nothing.

Expected behavior

Same as a local (non-WSL) workspace:

⌧ Ubuntu-20.04  │  🗀 my-repo  │  ⎇ main  │  ☐ worktree
  • Branch name displayed.
  • Chip clickable, opening the branch picker to switch branches.
  • worktree checkbox functional.

Steps to reproduce

  1. On Windows, install WSL2 with a distro (Ubuntu 20.04 here).
  2. Clone a git repo inside the WSL filesystem, not under /mnt/c.
  3. Open that folder as a workspace in the Claude Code desktop app.
  4. Look at the workspace chip row.

Evidence that git itself is fine

Run inside the same WSL distro, in the same directory the app has open:

$ git --version
git version 2.25.1

$ git branch --show-current
main

$ git status -sb | head -1
## main...origin/main

$ git branch --list
* main
  feature-a
+ feature-b
+ feature-c

Ownership and permissions are clean, and there is no safe.directory / dubious-ownership condition:

$ ls -ld .git
drwxr-xr-x 9 myuser myuser 4096 .git

$ git config --global --get-all safe.directory
$ echo $?
1

So git branch --show-current returns the correct value on demand — the app just isn't reflecting it in the chip. The same is true with additional worktrees registered via git worktree add; git worktree list reports them correctly while the UI still shows .

Note that the CLI agent inside the same session can run git and read the branch correctly. It is specifically the desktop UI chip that is empty.

Environment

| | |
|---|---|
| Claude Code version | 2.1.227 |
| Platform | Claude Code desktop app on Windows |
| Workspace location | WSL2 — Ubuntu 20.04.6 LTS (Focal Fossa) |
| Kernel | 6.18.x-microsoft-standard-WSL2 |
| Repo path | inside the WSL filesystem, not /mnt/c |
| git | 2.25.1 (Ubuntu package) |

A Git for Windows install also exists on the host at C:\Program Files\Git\cmd\git.exe, in case the app is resolving that binary against a Linux path.

Relation to existing issues

This looks like the same chip-row code path as #52690 ("Show git branch in remote (SSH) workspace chip row"), which reports the identical symptom — ⎇ —, non-interactive chip, disabled worktree checkbox — for SSH remote workspaces on macOS, while git branch --show-current on the remote returns the correct branch.

That issue was closed as not planned with a stale label. Filing this separately because:

  • It reproduces on WSL, not SSH, which is a much more common Windows setup and is not covered by the original report.
  • On Windows + WSL there is no comparable "just look at the title bar" fallback, and WSL workspaces are otherwise presented as first-class in the app.

Also related: #49933 (native WSL remote integration).

Impact

Without a branch indicator there is no at-a-glance confirmation of which branch a session is about to modify. In a repo with several active feature branches and worktrees, this makes it easy to start work — or let the agent commit — on the wrong branch, including directly on the default branch. The workaround is to ask the agent to run git branch --show-current at the start of every session, which is easy to forget.

View original on GitHub ↗

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