Status line disappears after briefly appearing
Resolved 💬 3 comments Opened Feb 27, 2026 by jason-majors-anchor Closed Mar 3, 2026
Description
The status line briefly appears (e.g., during the "thinking" phase) then disappears and doesn't come back. Restarting Claude Code does not fix it.
Configuration
~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "~/bin/gitBranches.sh"
}
}
The script reads JSON from stdin, extracts workspace.current_dir, and outputs a single line with the current git branch:
#!/bin/bash
input=$(cat)
DIR=$(echo "$input" | jq -r '.workspace.current_dir' 2>/dev/null)
if [ -z "$DIR" ] || [ "$DIR" = "null" ]; then
DIR="$PWD"
fi
if ! git -C "$DIR" rev-parse --git-dir > /dev/null 2>&1; then
echo "no repo"
exit 0
fi
CURRENT=$(git -C "$DIR" branch --show-current 2>/dev/null)
if [ -n "$CURRENT" ]; then
echo "branch: $CURRENT"
else
echo "detached HEAD"
fi
What I've verified
- Script is executable (
chmod +x) jqis available- Script produces correct output when tested manually:
````
$ echo '{"workspace":{"current_dir":"/path/to/repo"}}' | ~/bin/gitBranches.sh
branch: my-feature-branch
- Script always produces output (fallbacks for no-repo and detached HEAD cases)
- Script exits with status 0
- Tried having the config in
~/.claude/settings.jsononly (no project-level override) - Tried having it in
.claude/settings.local.jsonand.claude/settings.jsonat the project level - Restarted Claude Code multiple times
Observed behavior
- Status line briefly appears during the "thinking" phase of a response
- Status line disappears after the response completes
- Status line does not reappear until the next "thinking" phase
Expected behavior
Status line should persistently display the script output, updating after each assistant message per the docs.
Environment
- Platform: Linux (Cloud Workstation)
- Shell: zsh
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗