[Bug] Custom statusLine command from settings.json not being executed
Open 💬 22 comments Opened Dec 10, 2025 by jkaster
Bug Description
Title: Custom statusLine command in ~/.claude/settings.json is not executed
Environment:
- Platform: macOS Darwin 24.6.0
- Model: claude-opus-4-5-20251101
Configuration (~/.claude/settings.json):
{
"statusLine": {
"type": "command",
"command": "/Users/jkaster/.claude/statusline-command.sh"
}
}
Expected behavior: The statusLine command script should be called periodically (every ~300ms) when conversation messages update, receiving JSON input via stdin and displaying the first line of stdout as the
status line.
Actual behavior: The script is never called. Adding debug logging to the script confirms no invocations occur - no log file is created.
Verification steps taken:
- JSON syntax validated with jq - valid
- Script is executable (chmod +x) - confirmed -rwxr-xr-x
- Script runs correctly when invoked manually with mock JSON input
- Script outputs single line to stdout with ANSI colors
- No project-level settings override the statusLine config
To reproduce:
- Add statusLine configuration to ~/.claude/settings.json
- Create executable script at the specified path
- Start Claude Code session
- Observe that custom status line never appears and script is never invoked
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.62
- Feedback ID: a8fe6feb-5dcf-46c6-ad2d-6e73825b0cff
Errors
[]
22 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I'm talking about the status line at the bottom of Claude Code, which was working just fine until 2.0.62
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Yes, this is still happening .. Cannot get the statusline which shows at the bottom (usually)
Still an issue for me on 2.1.12
Still an issue for me on 2.1.20
still an issue on 2.1.37
fix it fast please
This seems to be happening when Claude cannot detect the correct shell path:
However, my default shell is another Zsh version installed using MacPorts:
In my case I fixed it by setting
CLAUDE_CODE_SHELLvariable in my~/.claude/settings.json:However the statusline only displays after the first prompt response, and is only updated when a response is displayed
Same issue on v2.1.49, Windows Terminal
Windows PowerShell the same issue.
Still broken on v2.1.56 (macOS Darwin 25.2.0). Script is executable, runs correctly when invoked manually, settings.json config is valid — command is simply never executed by Claude Code.
Same issue on 2.1.56 (Windows Terminal)
Windows Native (Git Bash) - Still broken in v2.1.62
Environment:
Reproduction:
Configured
statusLinein~/.claude/settings.jsonwith various approaches — none work:Debug result: Added a log-writing test script — log file is never created, confirming the command is never invoked at all.
Note: The script works perfectly when run manually. This is purely a Claude Code invocation issue on Windows Native (non-WSL).
I ran into this too and eventually got it working again. In my case the root cause was
IS_DEMO=1.I was using
IS_DEMO=1(env var) to hide my account email when screen sharing / taking screenshots. I'd seen it mentioned online as the only current way to do this, but I couldn't find a clear description of all the side effects, one of which turned out to be crucial here.What's happening
On first launch in a project, Claude Code normally asks whether you trust the project. When you accept, it writes an entry into
~/.claude.jsonunder theprojectslist with:hasTrustDialogAccepted: true(defaults tofalse)With
IS_DEMO=1, the trust prompt never appears, sohasTrustDialogAcceptedstaysfalseindefinitely. That seems to disable (or partially disable) features that could involve untrusted code execution, and it also appears to affect things like status lines.What I observed
IS_DEMO: trust prompt appears = everything works.IS_DEMO: no trust prompt = things break.IS_DEMO=1andhasTrustDialogAccepted=true: everything works.TL;DR / Fix
If you have
IS_DEMO=1set, you won't see the trust question on startup, and that can silently break features (including status lines). Fix is either:IS_DEMO, orhasTrustDialogAcceptedtotruein~/.claude.json.Note: trust is hierarchical, you can set
hasTrustDialogAccepted=trueon a parent folder (e.g./path/to/projects-folder) to cover everything beneath it. Obviously only do that if you're comfortable granting blanket trust to code in that folder.Hope this saves someone else some time, this took me a while to track down!
Still broken on v2.1.107 — Windows 11 / Git Bash / Windows Terminal
Confirming this is still not fixed. Same symptom as @vimholic's report above.
Environment:
Config in ~/.claude/settings.json:
"statusLine": {
"type": "command",
"command": "python C:\\Users\\xyz\\.claude\\statusline.py"
}
Diagnostic: Added a debug logger to the statusline script that writes raw stdin to a log file on every invocation. After full
Claude Code restart in a fresh terminal and several user prompts, the log file is never created — confirming the script is not
being invoked at all. The script itself works correctly when called manually.
Workarounds tried (all unsuccessful):
still not called.
Affected since at least v2.1.62 (@vimholic) → still present in v2.1.107.
Still happening
Can confirm, still happening.
Thanks @xInfinitYz — confirming the same symptom on macOS with zsh on my side, so this is not Windows/Git-Bash-specific:
~/.claude/bin/statusline.sh(shebang#!/bin/bash,chmod +xverified, manual invocation works and emits JSON to stdout)Workarounds tried (same symptom as reported above):
~: no change"type": "command"explicit: no changehasTrustDialogAccepted: trueverified in~/.claude.json: already trueCross-platform signal suggests the bug isn't tied to shell discovery — the statusLine invocation itself seems to not happen, regardless of which shell would've been resolved.
_[Comment redacted – the root cause of my issue is different than this bug. Company-managed config, not Claude Code itself.]_
Same issue here, 2.1.139, Windows 11.
Running
claude --debugconsistently shows this warning in the debug file:No matter what I try (bash, powershell, node, cmd, direct script invocation) the command is never invoked and the "command" value in the settings.json is written in the log line.
I had the same problem – no statusline whatever I did.
Using
claude --debugI found this error in the log:2026-06-12T09:55:30.567Z [DEBUG] StatusLine [powershell -NoProfile -File C:\Users\MYUSERNAME\.claude\statusline.ps1] stderr: Das Argument "C:UsersMYUSERNAME.claudestatusline.ps1" f�r den -File-Parameter ist nicht vorhanden. Geben Sie als Argument f�r den -File-Parameter den Pfad zu einer vorhandenen .ps1-Datei an.
The agent simply did not find my .PS1 statusline script.
In C:\Users\MYUSERNAME\.claude\settings.json I found:
"statusLine": {
"type": "command",
"command": "powershell -NoProfile -File C:\\Users\\MYUSERNAME\\.claude\\statusline.ps1"
}
Changing the backslashes to forward slashes solved the problem!
"command": "powershell -NoProfile -File C:/Users/MYUSERNAME/.claude/statusline.ps1"
BTW: That defective settings.json line was written by Claude Code itself, and it tried heavily to understand why it did not work, before telling me that this must be a bug in the current agent version. ;D