Claude Code Status Line Not Showing or Blank: How to Fix It

Claude Code Status Line Not Showing or Blank: How to Fix It

If your Claude Code status line is not showing, the cause is almost always the script behind it. Claude Code only draws the row when your statusLine command exits with code 0 and prints something to stdout. A script that isn’t executable, a wrong path, output sent to stderr, a non-zero exit code or broken JSON in settings.json will all leave the row blank, with no error on screen.

The fastest fix is to run the script yourself with a small sample JSON and check its exit code. If that works, accept the folder trust dialog, then start Claude Code with --debug-file and search the log for StatusLine. The log names the exact problem, such as Permission denied or completed with status 127.

We broke a working status line seven different ways in a throwaway project and recorded what each one looked like. Below you’ll find every cause, the real output we saw and the exact fix.

Browse all our Claude Code tutorials for more fixes and how-tos.

Tested with Claude Code v2.1.332 on macOS on December 4, 2026. Every status line in this guide lived in a demo project’s .claude/settings.json, so nothing outside the demo was changed. Items marked as coming from the docs follow Anthropic’s official status line page, and we say so each time.

Quick Summary: Why the Claude Code Status Line Is Blank

Find what you see in the first column. The first seven rows are problems we triggered ourselves on v2.1.332.

What you seeCauseFixHow we checked it
Blank row, log says Permission denied, status 126Script is not executablechmod +x the scriptTested in the terminal
Blank row, log says No such file or directory, status 127Wrong path in commandFix the path, use an absolute oneTested in the terminal
Blank row, log shows completed with status 1Script exits with an errorMake it exit 0Tested in the terminal
Blank row, your text appears after stderr: in the logScript prints to stderrPrint to stdoutTested in the terminal
Blank for several seconds, then it appearsSlow scriptCache slow commandsTested in the terminal
Settings Error at startupBroken JSON in settingsValidate with jq .Tested in the terminal
Blank row, nothing in the logdisableAllHooks is trueRemove it or set it to falseTested in the terminal
Shows null or --Field is empty before the first replyAdd a fallback like // 0Tested in the terminal
Blank until you accept a dialogFolder not trustedAccept the trust dialogDocs, plus the dialog we saw
Disappeared on a work machineManaged allowManagedHooksOnly policyAsk your adminFrom the official docs

How the Claude Code Status Line Works

The status line is a row at the bottom of Claude Code that shows whatever a command of yours prints. You set it with a statusLine block in your user settings (~/.claude/settings.json) or in a project’s .claude/settings.json. If you have never set one up, our status line guide covers the basics.

Here is the setup we used for every test. The script reads the session JSON that Claude Code sends on stdin and prints one line.

{
  "statusLine": {
    "type": "command",
    "command": "~/claude-code-demos/status-line-fix/.claude/statusline.sh"
  }
}
#!/bin/bash
# Read the JSON session data Claude Code sends on stdin
input=$(cat)
MODEL=$(echo "$input" | jq -r '.model.display_name')
DIR=$(echo "$input" | jq -r '.workspace.current_dir')
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
echo "[$MODEL] ${DIR##*/} | ${PCT}% context"

When everything is right, the output appears in its own row just above the footer, as in the capture below.

Claude Code with a working status line showing the model, folder name and 0% context
A working status line: the script’s output sits in its own row above the mode line

According to the official docs, Claude Code shows the output only after the script exits with code 0. Anything else, including empty output, leaves the row blank. That one rule explains most of the problems in this guide.

Diagram of how the Claude Code status line works: settings.json, trusted folder, script runs, exit 0 plus stdout
Four things have to go right before the row appears; a break at any step leaves it blank

A blank status line is not a display bug. It is Claude Code telling you the command didn’t finish cleanly.

First Step: Find Out Why the Status Line Is Not Showing

Before you change anything, collect two clues. They point straight at the cause in almost every case.

Run the script yourself with sample input

The docs suggest testing with mock input. Save a tiny JSON file, pipe it into the exact path from your settings and print the exit code:

echo '{"model":{"display_name":"Opus"},"workspace":{"current_dir":"/tmp/demo"},"context_window":{"used_percentage":25}}' > mock.json
cat mock.json | ~/.claude/statusline.sh; echo "exit code: $?"

You want a line of text and exit code: 0. In our test the script was not executable, so we got Permission denied and code 126. After chmod +x, the same command printed the status line and exit code 0.

Terminal showing a status line script failing with Permission denied and exit code 126, then working after chmod +x
Testing the script by hand: exit code 126 before the fix, real output and 0 after it

Read the debug log

If the script works by hand but the row is still empty, ask Claude Code itself. The docs say claude --debug logs your script’s stderr on every run and its exit code on the first run in a session. We used --debug-file, which writes the log to a file you choose:

claude --debug-file sl.log
grep StatusLine sl.log

Here are the real log lines from four of our broken setups. Each one names its own cause.

Claude Code debug log lines for the status line showing Permission denied, No such file or directory and exit statuses 126, 127 and 1
The StatusLine lines in the debug log: the stderr text and the exit status tell you what broke

Now match what you found to one of the fixes below. The decision ladder also shows the order we recommend.

Decision ladder for a blank Claude Code status line: settings error, folder trust, script failure, stderr or slow script, disableAllHooks
Work down the checks in order and stop at the first one that matches

Fix 1: The Script Is Not Executable

This is the most common cause. You saved a script but never marked it as a program, so the shell refuses to run it. Claude Code shows nothing at all, as in this capture.

Claude Code with no status line row because the status line script is not executable
With a non-executable script, the status line row is simply missing

The log line reads Permission denied and completed with status 126. The fix is one command:

chmod +x ~/.claude/statusline.sh

You don’t need to restart. The docs say your edits show up the next time an update runs the script, such as after the next reply. You can also point the command at an interpreter instead, for example bash ~/.claude/statusline.sh, which works even without the executable bit.

Fix 2: The Path in settings.json Is Wrong

A typo in the file name, or a relative path that only works from one folder, gives a status of 127. Our log said No such file or directory after we pointed the setting at status-line.sh instead of statusline.sh.

  • Copy the path from the command field and run ls -l on it to confirm the file exists.
  • Prefer a full path, such as ~/.claude/statusline.sh, over a relative one like ./statusline.sh.
  • Status 127 is the shell’s “command not found” code, so an inline command that calls a missing tool fails the same way. If you use jq, run command -v jq to check it is installed, because the docs note you may need to install it.

Windows paths

We tested on macOS; the Windows steps follow Anthropic’s official instructions. On Windows, Claude Code runs the command through Git Bash when it is installed, and Git Bash treats backslashes as escape characters. The docs say to write paths with forward slashes, like C:/Users/you/.claude/statusline.ps1, and to run PowerShell scripts with powershell -NoProfile -File.

Fix 3: The Script Exits With an Error

Your script can print the perfect line and still be hidden. We added exit 1 to the end of a working script, and the row went blank while the log showed completed with status 1.

Look for the last command in your script. If something like grep or git fails at the end, its exit code becomes the script’s exit code. Add exit 0 as the final line, or handle the failing command with || true.

Fix 4: Output Goes to stderr Instead of stdout

Claude Code only reads stdout. When we added >&2 to the echo line, the script still exited 0, but the row stayed blank. The text showed up in the debug log after stderr: instead.

Remove any >&2 from your output lines. In Python use print(), not sys.stderr.write(), and in Node use console.log(), not console.error().

Fix 5: A Slow Script Delays the Status Line

The docs say slow scripts block the status line from updating until they finish. To show it, we put a 10-second sleep at the top of our script, standing in for a slow git status on a large repo.

Two Claude Code captures: no status line 5 seconds after start, then the status line appears after a 10-second script finishes
Five seconds in the row was still empty; it appeared only after the slow script finished

The docs add that if a new update starts while the old script is still running, Claude Code cancels the old one. A script that is always slower than your updates can look blank for a long time. Keep it fast and cache slow work, as the official docs show in their caching example.

Fix 6: Broken JSON in settings.json

A trailing comma or a missing quote breaks the whole file. Claude Code caught ours at startup with a Settings Error screen and the line and column of the problem.

Claude Code Settings Error screen saying settings.json has invalid or malformed JSON at line 5, column 3
The Settings Error screen: files with errors are skipped entirely, status line included

Note the line that says files with errors are skipped entirely. If you choose to continue without these settings, your statusLine is ignored along with everything else in that file. Exit and fix the file, then check it with jq:

jq parse error pointing to a trailing comma in a Claude Code settings.json file
jq reports the same line 5, column 3 and exits with code 5 on broken JSON

Remove the trailing commas and run jq . .claude/settings.json again until it prints the file cleanly. Our guide on settings.json problems covers other JSON mistakes, and settings file locations shows where each file lives.

Fix 7: The Folder Isn’t Trusted Yet

Because the status line runs a shell command, it follows the same workspace trust rule as hooks. The docs say it stays blank until you accept the trust dialog, and the debug log shows Status line command skipped: workspace trust not accepted.

Claude Code trust dialog warning that the folder configures hooks that can run commands, declared in .claude/settings.json
Our project-level status line triggered this warning; choosing Yes lets it run

Restart Claude Code in the folder and choose Yes, I trust this folder. If the dialog keeps coming back, our fix for the recurring trust prompt explains why.

Fix 8: disableAllHooks or a Managed Policy

This one is the hardest to spot because nothing shows in the log. We added this to the demo’s .claude/settings.local.json:

{
  "disableAllHooks": true
}

The status line vanished, and the debug log had no StatusLine lines at all.

The docs explain that when disableAllHooks is true outside managed settings, only a statusLine from managed settings can run. Remove the setting, or set it to false in the file that sets it. Search all your settings files, since it may sit in a different one than your statusLine.

On a work laptop, check one more thing. The docs say that if your organization sets allowManagedHooksOnly in managed settings, your custom status line disappears without warning. Only your administrator can change that.

Fix 9: The Status Line Shows null or —

Sometimes the row appears but shows empty values. The docs say some fields can be null before the first API response. We removed the // 0 fallback from our script to show what happens.

Claude Code status line showing null% context because the script has no fallback for an empty field
Without a fallback, jq prints null for the context percentage at the start of a session

Add a fallback to every field that can be empty, such as .context_window.used_percentage // 0. The docs suggest restarting Claude Code if values stay empty after several messages.

Let Claude Diagnose It for You

The docs also suggest asking Claude to read your settings and run the command. We made the script non-executable again and sent one prompt:

My status line is blank. Read .claude/settings.json, run its statusLine command once with a tiny sample JSON on stdin, and tell me in 3 short lines why it fails. Don't change any files.

Claude asked permission to run one Bash command, then found the cause in about eight seconds.

Claude Code reading settings.json, running the status line script and explaining it fails because the script is not executable
Claude ran the script, saw permission denied and exit code 126, and suggested chmod +x

Try It Yourself

Practice in a throwaway folder so your real setup stays untouched. Create a project with a .claude/statusline.sh and a matching .claude/settings.json, then break it one way at a time.

  1. Run chmod -x .claude/statusline.sh and start claude --debug-file sl.log.
  2. Confirm the row is blank, exit, and run grep StatusLine sl.log.
  3. Fix it, then try a trailing comma in the settings file.

Or paste this prompt into a session in that folder:

Check why my status line is blank. Read the statusLine setting, test the command with sample JSON, show me the exit code and output, and suggest one fix. Don't edit anything yet.

Common Mistakes

  • Editing the script but not saving it as executable after copying it from another machine.
  • Using echo -e with escape codes; the docs say printf '%b' is more reliable for links.
  • Putting the statusLine block inside another key, such as inside permissions.
  • Testing the script from a different folder than the one in the command path.
  • Forgetting that a crash in one settings file hides every setting in it.

Pro Tips

  • Keep output short. The docs say to keep each line at least four columns narrower than the terminal, using the COLUMNS variable Claude Code passes in.
  • If text looks garbled, simplify to plain text first, then add colors back one at a time.
  • Set refreshInterval only if you need time-based data such as a clock.
  • Run /doctor for a broader health check; our doctor guide explains its output.
  • For a richer setup, see how to show context and cost in the same row.

Claude Code Status Line Fix Cheat Sheet

Cheat sheet for a Claude Code status line not showing, with symptoms and the commands that fix them
Save this card: each symptom on the left, the command that finds or fixes it on the right

Frequently Asked Questions

Why is my Claude Code status line not showing after I set it up?

Most often the script is not executable, the path is wrong, or it exits with a code other than 0. Run the script by hand with sample JSON and check echo $?. If that works, check the trust dialog and the debug log.

Do I need to restart Claude Code after fixing the script?

Usually not. Claude Code reloads settings when you save them and runs the new script on the next update, such as a new reply. Restart if you changed trust or fixed a settings file that had a JSON error.

Does the status line use tokens?

No. The docs say the status line runs locally and does not consume API tokens. If you suspect it costs tokens, our post on status line tokens explains how to check.

Why does my status line hide sometimes?

The docs say it temporarily hides during certain screens, including the help menu and permission prompts. It returns when the screen closes.

Where can I find other Claude Code errors?

Our list of common Claude Code errors covers many more messages. For background on the assistant itself, see our Claude AI page.

Conclusion

A Claude Code status line that is not showing almost always comes down to one rule: the command must exit with code 0 and print to stdout. Test the script with sample JSON, read the exit code, and use --debug-file with grep StatusLine to see what Claude Code saw. Fix the permission, path, exit code or stderr problem it reveals, validate settings.json with jq, accept the trust dialog, and check for disableAllHooks when the log stays silent. The official troubleshooting section lists a few more edge cases, such as links that are not clickable.

Newsletter

New AI tools in your inbox

The best new tools and the AI news that matters, in one short email. Unsubscribe any time.

Free · No spam · Unsubscribe any time

✓ Looks like you’re subscribed

Loading Google’s sign-up form…

Looks like you’re already subscribed

Thanks for reading! New AI tools and the AI news that matters will land in your inbox.

Not subscribed yet? Refresh the page to load the sign-up form.

The sign-up form couldn’t load. If you use an ad or content blocker, allow news.google.com and reload the page.

Free instant check before you pay. Takes a few seconds.

Scroll to Top