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.

The status line is blank

Work through these checks in order:

  1. Make the script executable: chmod +x ~/.claude/statusline.sh.
  2. Print the line to stdout, not stderr.
  3. Run the script by hand to check it prints something.
  4. 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.
  5. If disableAllHooks is true outside managed settings, only a statusLine from managed settings runs. Remove it or set it to false.
  6. If your organization sets allowManagedHooksOnly, only a managed statusLine can show. Ask your admin.
  7. Run claude --debug. It logs the script's stderr on each run, and its exit code on the first run in a session.
  8. Ask Claude to read your settings file and run the statusLine command, to surface any errors.

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 setup guide 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 set one up by hand.