Hey! I ran into something weird — after a while my machine started crawling and I found 35+ ccstatusline processes all sitting there doing nothing.
What's happening
Claude Code spawns a new ccstatusline process each refresh cycle but keeps the stdin pipe open without sending EOF. Since readStdin() waits for EOF before processing (for await (const chunk of process.stdin)), each process just hangs indefinitely. They pile up fast with a short refreshInterval.
You can reproduce it like this:
# keeps pipe open, like Claude Code does
(echo '<status-json>'; sleep 60) | ccstatusline
# hangs forever
Workaround I found
Wrapping with head -1 forces EOF after the first line and things work fine:
"statusLine": {
"command": "bash -c 'head -1 | ccstatusline'"
}
Possible fix
Adding a read timeout in readStdin(), or resolving as soon as stdin goes idle, would probably handle this cleanly without needing the wrapper.
Not sure if this is also a Claude Code bug (it probably should close stdin), but figured it's worth flagging here too since ccstatusline could defend against it.
Thanks for the great tool!
Hey! I ran into something weird — after a while my machine started crawling and I found 35+ ccstatusline processes all sitting there doing nothing.
What's happening
Claude Code spawns a new ccstatusline process each refresh cycle but keeps the stdin pipe open without sending EOF. Since
readStdin()waits for EOF before processing (for await (const chunk of process.stdin)), each process just hangs indefinitely. They pile up fast with a shortrefreshInterval.You can reproduce it like this:
Workaround I found
Wrapping with
head -1forces EOF after the first line and things work fine:Possible fix
Adding a read timeout in
readStdin(), or resolving as soon as stdin goes idle, would probably handle this cleanly without needing the wrapper.Not sure if this is also a Claude Code bug (it probably should close stdin), but figured it's worth flagging here too since ccstatusline could defend against it.
Thanks for the great tool!