Claude Code status line not showing? How to fix it
These fixes for Claude Code in a terminal come from Anthropic's status line docs.
In Claude Desktop, the Code tab doesn't run your statusLine command at all. The Claude Desktop guide covers that case.
Let Claude Code find the problem
Paste this into Claude Code. It checks your settings and runs your status line with sample input, then tells you the cause and waits before changing anything.
Show the promptHide the prompt
My Claude Code status line isn't showing. Find out why, following statuslin.es/guide/status-line-not-showing. Tell me what you find before you change anything.
1. If this session runs in Claude Desktop's Code tab, say so and stop: the Code tab doesn't run statusLine. Point me to statuslin.es/guide/claude-desktop.
2. Read any managed settings my organization installed, ~/.claude/settings.json, then this project's .claude/settings.json and .claude/settings.local.json. Find the statusLine that applies. If there is none, say so and stop.
3. If its command runs a script, check the file exists and is executable. On Windows, check the path uses forward slashes.
4. Run the command yourself with this sample input. Show me what it prints to stdout and stderr, its exit code, and how long it took:
echo '{"model":{"display_name":"Opus"},"workspace":{"current_dir":"'"$PWD"'"},"context_window":{"used_percentage":12}}' | <the command>
It must print to stdout and exit 0. Name any tool it needs that isn't installed, such as jq.
5. Check whether disableAllHooks is true, whether my organization sets allowManagedHooksOnly, and whether this session started with --safe-mode. Each one stops a statusLine I set myself; disableAllHooks in managed settings turns the status line off entirely.
6. If everything passes, this folder may not be trusted yet. Tell me to restart Claude Code and accept the trust dialog.
Then tell me the cause in one sentence and the smallest fix. Make no changes until I say yes.The status line is blank
Work through these checks in order:
- Make the script executable: chmod +x ~/.claude/statusline.sh.
- Print the line to stdout, not stderr.
- Run the script by hand to check it prints something.
- On Windows with Git Bash, use forward slashes in the command path, since backslashes get eaten as escape characters. A path starting with ~ also works.
- If disableAllHooks is true outside managed settings, only a statusLine from managed settings runs. Remove it or set it to false.
- If your organization sets allowManagedHooksOnly, only a managed statusLine can show. Ask your admin.
- If managed settings set disableAllHooks, the status line is off entirely, a managed statusLine included. Ask your admin.
- If you started Claude Code with --safe-mode, only a managed statusLine runs. Start it without the flag.
- Run claude --debug. It logs the script's stderr on each run, and its exit code on the first run in a session.
- Ask Claude to read your settings file and run the statusLine command, to surface any errors. The fix prompt at the top of this page does that for you.
You haven't trusted the folder
The status line stays blank until you accept the workspace trust dialog for the folder, or for a parent folder whose trust extends to it. statusLine runs a shell command, so it follows the same trust rule as hooks.
claude --debug logs Status line command skipped: workspace trust not accepted. Restart Claude Code and accept the dialog.
The script errors or hangs
Claude Code shows the output only after the script exits with code 0. A non-zero exit, or no output, leaves the line blank. A slow script blocks updates, and a new update cancels a run that hasn't finished.
Test the script outside Claude Code with mock JSON on stdin. The guide to writing your own shows the JSON Claude Code sends.
It shows -- or empty values
Fields can be null before the first API response. Give each jq lookup a fallback, such as // 0. If values stay empty after several messages, restart Claude Code.
The context percentage differs from /context
The status line uses the token counts from the last API response, while /context adds an estimate for the messages since then. Use context_window.used_percentage.
The output looks garbled
Complex escape sequences can glitch when they overlap a UI update, more so in a status line with several lines. Try plain text.
The line is cut off
Outside fullscreen mode, notifications share the status line's row and can cut it short in a narrow terminal.
Turn the status line off
Run /statusline delete, or remove the statusLine field from your settings.json.
Common questions
Why is my Claude Code status line blank?
Claude Code shows the line only after your script prints to stdout and exits with code 0. Make the script executable with chmod +x, run it by hand to check it prints something, and run claude --debug to see the script's stderr.
Does the status line need workspace trust?
Yes. statusLine runs a shell command, so like hooks it stays off until you accept the workspace trust dialog for the folder, or for a parent folder whose trust extends to it. Restart Claude Code and accept the dialog.
Does my status line show in Claude Desktop?
No. Claude Desktop's Code tab doesn't run your statusLine command. The statuslin.es Claude Desktop guide covers how to show it there.
Start from a working status line
Each status line in the gallery shows its real output before you copy it. Browse minimal status lines, status lines that show token usage or bash status lines, or write your own.