[BUG] StatusLine command receives open-but-never-written stdin pipe, blocking all stdin reads
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The statusLine type: "command" configuration spawns the command with stdin connected to an open pipe, but Claude Code never writes data to it and never closes it. Any command that reads from stdin (to access contextual data like model name or context window usage) blocks indefinitely and produces no output, causing the status line to not render.
What Should Happen?
Either (a) Claude Code sends context JSON on stdin and closes the pipe (matching hook behavior), or (b) Claude Code closes stdin immediately so commands can detect
there is no input and proceed.
Error Messages/Logs
Steps to Reproduce
- Add the following to ~/.claude/settings.json:
"statusLine": {
"type": "command",
"command": "powershell.exe -NonInteractive -NoProfile -Command \"$d = $Input | Out-String; Write-Host $d\""
}
- Start Claude Code.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.175
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Hooks (type: "command" in the hooks config) correctly send a JSON payload on stdin and close the pipe after writing. The statusLine command appears to use different spawn behavior that
omits both the write and the close.
The documentation for statusLine does not specify whether commands receive stdin input, so it is unclear whether this is a bug or an unimplemented feature. Either way, the current
behavior (open pipe, no data, no close) makes stdin unusable and prevents status line commands from accessing any Claude Code context.
Workaround: Avoid reading stdin in the statusLine command. This limits the status line to locally-derivable information only (current directory, git branch, etc.) and makes model name
and context window percentage inaccessible.
Request: Send a JSON payload (matching the structure documented or used by hooks) to the statusLine command's stdin, then close the pipe. This would allow status line scripts to display
dynamic Claude Code state.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗