statusLine command that fails silently (missing script) renders blank with no error
Summary
A custom statusLine.command that exits non-zero (e.g. the script no longer exists at the configured path) renders the statusline blank with no error or diagnostic.
What happened
My settings.json has a custom statusline:
"statusLine": { "type": "command", "command": "python3 ~/scripts/statusline.py" }
I moved the script to a different directory but forgot to update the path in settings.json. From then on the statusline just rendered blank — no error, no warning, nothing indicating the command was failing (a plain No such file or directory, exit 127).
The blank only became visible right after an unrelated settings.json edit — which triggers a settings reload that re-runs the statusline command. So it looked like the edit had caused it, when the real cause was the stale path failing silently the whole time. It took manually running the command to discover the actual error.
Expected
When a statusLine command exits non-zero (missing file, crash, etc.), surface a low-key hint instead of silently rendering blank — e.g. a dim ⚠ statusline: <path>: No such file or directory (exit 127) in the status area, or a one-time notice.
Why it matters
Silent failure makes an accidental file move or a typo'd path effectively undiagnosable, and it misattributes the blank statusline to whatever unrelated settings change happened to trigger the reload.
Environment
- Claude Code 2.1.206
- macOS