[BUG] statusLine regression in 2.1.171/2.1.172 (Windows): command now spawned via Git Bash - backslash paths silently fail, status line blank
Summary
After auto-updating 2.1.170 → 2.1.172 (native install, Windows 11), a previously working custom statusLine stopped rendering in all sessions. The config and script were not the problem: 2.1.17x spawns the statusLine command through Git Bash (bash.exe -c "<command>"), where unquoted backslashes are escape characters, so a backslash-style Windows command silently dies with exit 127 and Claude Code renders nothing (no error surfaced anywhere). On ≤ 2.1.170 the exact same config rendered fine for days.
Environment
- Claude Code 2.1.172, native install; auto-update 2.1.170 → 2.1.172 on 2026-06-10 (confirmed by
.last-update-result.json) - Windows 11 Pro (10.0.26200), Git for Windows installed (
C:\Program Files\Git) - statusLine command: stdlib Python script; works when run manually
Config (worked on ≤ 2.1.170, silently dead on 2.1.172)
"statusLine": {
"type": "command",
"command": "C:\\Python314\\python.exe C:\\Users\\<user>\\.claude\\statusline.py",
"refreshInterval": 5
}
Evidence
1. Claude Code does invoke the command — via Git Bash. Polling Win32_Process with multiple sessions open shows a bash spawn every ~5 s (the refreshInterval), but python.exe never starts:
bash.exe :: "C:\Program Files\Git\bin\bash.exe" -c "C:\Python314\python.exe C:\Users\<user>\.claude\statusline.py"
2. The failure mode, reproduced directly in Git Bash:
$ bash -c "C:\Python314\python.exe C:\Users\<user>\.claude\statusline.py"
bash: line 1: C:Python314python.exe: command not found # exit 127
Unquoted backslashes are bash escapes, so the path collapses to C:Python314python.exe. The script never runs; empty output makes the status line disappear silently.
3. Confirmation it's the spawn shell, not the config or script:
- The script runs fine manually (PowerShell pipe test, and
bash -cwith forward-slash paths — both exit 0 with correct output). - 2.1.172's embedded settings schema accepts the config (
refreshInterval: k.number().min(1).optional().catch(void 0)— verified by scanning the installed binary), so this is not schema rejection. - Changing only the command to forward slashes fixes it instantly — running sessions hot-reload it and
python.exestatusline spawns appear in the process log.
Expected behavior
One or more of:
- Backslash-path commands keep working on Windows as on ≤ 2.1.170 (native spawn, or normalize/quote the command before handing it to bash), or
- The spawn failure (exit 127) is surfaced — e.g. a once-per-session statusline error indicator — instead of the line silently vanishing, and
- The Git Bash execution environment and path requirements are documented at https://code.claude.com/docs/en/statusline.
Workaround
Use forward slashes in statusLine.command; they work in bash, PowerShell, and cmd:
"command": "C:/Python314/python.exe C:/Users/<user>/.claude/statusline.py"
Related
- #66455 (statusLine never displayed on Windows/Git Bash, 2.1.156)
- #52997, #30725 (earlier Windows statusLine display regressions after upgrades)
🤖 Generated with Claude Code
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗