The default Claude Code statusline is honest but thin: model name, working directory, that's about it. After a few long sessions I wanted more from it. How much of the context window have I burned? Am I close to the 5-hour rate limit? Has the agent finished and I missed it because I was in another tab?
Claude Code lets you replace the statusline with any shell command. It pipes a JSON blob to stdin on every render and prints whatever your script writes to stdout. So the upgrade is just bash and jq .
Read full blog post on my website
This is the seven-field bar I ended up with, the script behind it, and the wiring in ~/.claude/settings.json . Setup is about three minutes if you have jq installed.
Key Takeaways
The statusline is a shell command Claude Code re-runs on every UI render. It receives a JSON payload on stdin.
The payload exposes the model, context-window percentage, cwd, transcript path, and the 5h + 7d rate-limit windows.
jq parses every field in one line. ANSI escapes color the output.β¦