Claude Code status line not showing? Seven causes
An empty or broken Claude Code status line is almost always one of seven things. How to test the script by hand, and fix settings, paths, jq, width and speed.
A status line is a script Claude Code runs and whose output it shows. When nothing appears, the fault is almost always in one of seven places, and most can be found in a minute by running the script yourself.
First: run it by hand
echo '{"model":{"display_name":"Opus"},"workspace":{"current_dir":"'"$PWD"'"},"context_window":{"used_percentage":42}}' \
| bash ~/.claude/statusline.shIf this prints your line, the script works and the problem is in the settings. If it prints nothing or an error, the problem is in the script.
The seven causes
- Invalid JSON in settings.json. A missing comma disables the whole file. Check it with
jq . ~/.claude/settings.json. - Wrong key. It is
statusLine, withtype: "command". - Bad path or permissions. Use a full path, and run it through
bashso the executable bit does not matter. - jq not installed. Most scripts parse the input with it.
command -v jqtells you. - Output on stderr. Only standard output is shown. Print the line with
echoorprintf, not to>&2. - Too slow. A run still going when the next update arrives is cancelled. Remove slow commands; see the git branch in your status line.
- Too wide. A line wider than the terminal wraps or clips. Size from
COLUMNS, nottput cols, as covered in the Claude Code status line.
Parts missing, not all of it
Usage limit fields appear only on Pro and Max plans and only after the first reply; context can be null at the start. A script that assumes they exist prints broken output on the first turn. Read every field with a fallback, such as // empty in jq.
Odd characters
Boxes instead of rounded ends mean a missing Nerd Font; muddy colours mean no 24-bit colour. See Nerd Fonts and checking 24-bit colour.
Capsule Status Line comes with an installer that backs up settings.json, changes only its statusLine key, and stops to ask before replacing a status line you already have, then shows all three themes with a demo so you see it working before you start a session.
Questions
How do I test a status line script without Claude Code?
Pipe sample JSON into it: echo a small JSON object with model and workspace fields into the script and look at what it prints. If it prints nothing or an error there, it will in Claude Code too.
Where does the status line configuration go?
In the statusLine field of ~/.claude/settings.json or a project's settings, with type set to command and command set to what to run. The key is statusLine, in camel case.
Why does my status line show only part of the line?
It may be wider than the terminal, or print something Claude Code does not expect. Size it from the COLUMNS variable, and print only the line itself to standard output.