Claude Code Status Line: the 7 gotchas that make yours lie to you (payload reference, copy-paste snippets, and a one-line install) A developer detailed the seven pitfalls that cause Claude Code status lines to display incorrect information, based on their experience building and refining one. The post includes the full JSON structure passed to the status line command, code snippets for debugging, and a one-line installable version. The developer emphasized that these bugs are undocumented and were present in their own shipped status line for weeks. Everything I learned writing and rewriting a Claude Code status line: the full shape of the JSON you get on stdin, the seven bugs that quietly make a status line wrong, and a finished one you can install in a single line. The bugs are the interesting part. Every one of these was in my own status line, shipped, for weeks. None of them are in the docs. How it looks schematically: โœป O5 H โ”ƒ ๐Ÿ“ my-repo ๐ŸŒฟ main โ—3 โ†‘1 โ”ƒ ๐Ÿ’ฐ $0.42 ยท 4m +1.2k/-340 โ”ƒ ๐Ÿง  36% 357k/1.0M โฑ5h 63% โ†ป1h07m โ”ƒ โ˜• 52m break session place change budget rest Contents How a status line works https://gist.github.com/starred.atom how-a-status-line-works The JSON you actually get https://gist.github.com/starred.atom the-json-you-actually-get The 7 gotchas https://gist.github.com/starred.atom the-7-gotchas Snippets worth stealing https://gist.github.com/starred.atom snippets-worth-stealing Or just install mine https://gist.github.com/starred.atom or-just-install-mine Claude Code runs one command of your choosing on every render and pipes it a JSON blob describing the session. Whatever the command prints on stdout becomes the bar at the bottom of your window. That is the entire contract. { "statusLine": { "type": "command", "command": "python3 \"/Users/you/.claude/glint.py\"" } } It runs locally, on your machine, with no API calls, so it costs nothing and counts against no quota. It also runs constantly , which is the source of gotcha 4. Two ways to get one: - Type /statusline show model, git branch and context percentage and Claude writes the script for you. Good starting point, zero trust required. - Install a finished one. Mine is one line https://gist.github.com/starred.atom or-just-install-mine . Fields I have actually consumed in a working status line, so this is what I can vouch for rather than a copy of a schema. There are more session id , output style , version , and the set drifts, which is why the dump script below matters. Anything can be absent, and the ones marked sometimes are absent most of the time, which is exactly how a status line ends up printing None . { "model": { "display name": "Claude Opus 4.6", "id": "claude-opus-4-6" }, "workspace": { "current dir": "/Users/you/code/repo", "git worktree": "wt-refactor" }, "cwd": "/Users/you/code/repo", "transcript path": "/Users/you/.claude/projects/