Journal
Tutorials

Claude Code Statusline: Show Live Session Info in Your Prompt

C

Clearly Team

Engineering

5 min read
Jul 10, 2026

Claude Code Statusline: Show Live Session Info in Your Prompt

Claude Code can render a custom status line — a persistent strip under the prompt showing whatever you want: the model, the working directory, the git branch, the running cost. It's a small touch that keeps you oriented, especially across several sessions. Here's how to wire one up.

How it works

You point Claude Code at a command. On each update it pipes the session context to that command as JSON on stdin, and the command prints one line to stdout — that line becomes your status line. Configure it in settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh"
  }
}

A copy-paste status line

A script that shows the model and the current directory's basename:

#!/bin/bash
INPUT=$(cat)
MODEL=$(echo "$INPUT" | jq -r '.model.display_name')
DIR=$(echo "$INPUT" | jq -r '.workspace.current_dir' | xargs basename)
echo "[$MODEL] $DIR"

Make it executable (chmod +x), point settings.json at it, and you'll see something like [Opus] my-project under every prompt. Add the git branch, the running cost, an emoji — it's just a shell script printing a line.

What you get on stdin

The JSON includes the model, the workspace directories, the session id, and cost/usage info — so you can surface exactly what you care about: which model am I on, how much has this session cost, which repo is this. Pull the fields you want with jq.

One status line, one session

A status line is perfect for the session you're looking at. But it only describes the one terminal in front of you — and the whole point of agentic coding is running several at once. For the fleet, you want a status line for all of them at a glance.

That's Mwah: every live Claude Code session as a little robot on your desktop, each showing its own name, project, and live activity — a status line per agent, floating, always visible. Feed the ones that nailed it; retire the stuck ones.


Related: Run multiple Claude Code sessions · Claude Code hooks: the complete guide

#claude code#statusline#customization#developer workflow#cli