Where your tokens go — and when the reset hits.

Tokens aren't free and they aren't endless. The default status line pretends they are. This one shows you what's left of your 5-hour and 7-day budget, how many tokens you've roughly burned, when it resets — and what the session has cost so far. One line, instead of prompting blind.

As of: May 2026 Setup: ~2 min Platform: macOS · Linux · WSL Tools: Claude Code, jq, sh
Sonnet 4.6 | ctx 18% | feature/booking | morning-session[5h] [████░░░░░░░░░░░░░░░░] 20% (~40k/200k tokens) | reset in 2h15m @ 14:30 CEST | $1.23[7d] [██████░░░░░░░░░░░░░░] 30% (~600k/2M tokens) | resets Sun 09:00 CEST

↳ Pinned at the bottom of the terminal where claude runs. Stays there while you work. More on typical setups below.

01What it shows

Three lines, four things you don't otherwise see.

The typical question after two hours of work: "Where did my tokens go?" The default status line doesn't answer that. It shows model and context, that's it. Once you're actually working, you want to know where your budget is going right now — before the limit, before the reset, before the expensive session.

Line 1
Model · context percent · git branch · session name. Dimmed gray, because it's status quo — doesn't change often, shouldn't pull focus.
Line 2 — [5h]
5-hour rate limit as a progress bar, plus estimated token usage against your plan budget, plus countdown to reset with local time, plus session cost. Accent color, because this is the line that warns you in time.
Line 3 — [7d]
7-day rate limit as a second bar, same layout. Matters on the Max plans, where you don't get past the 5-hour reset but across the week.
Meaning: you see in one line whether you've got two more hours or whether you're heading straight into the reset. Saves the blind prompt-on-anyway right before the limit.
Related · Research Why these limits exist in the first place. Who's subsidizing them right now and what happens when the Big Four have to earn back their investments: AI datacenter economics.
02Where it runs

Three typical setups. Whichever one you run — the bar works.

Claude Code is a CLI tool — the status line lives in the shell where claude runs. The three setups I see most often:

My setup
Editor with integrated terminal
Antigravity, Cursor, VS Code, JetBrains IDEs — editor and files on top, terminal panel below where claude runs. Bar sits at the bottom of the terminal panel, chat and code visible in parallel.
Classic
Standalone terminal
iTerm2, Warp, Ghostty, macOS Terminal, Windows Terminal, gnome-terminal — a terminal window, nothing else. claude starts, bar sits at the bottom of the window. Minimal setup, most common variant.
Power user
tmux / screen panes
tmux or GNU screen — one pane for claude, editor, logs, more shells next to it. Bar sits at the bottom of the claude pane, next to the tmux status bars.
03The prompt

Paste the block straight into the terminal — done.

You paste the prompt into the terminal where claude is currently running — i.e. where the bar should later show up. Claude takes it like a normal request, drops the script at ~/.claude/statusline-command.sh, patches your ~/.claude/settings.json, and shows you a test run at the end. You don't have to set anything up manually. Clean variant, no emojis — if the race variant is more your thing, see tweaks below.

Prompt — variant A (clean)
Bau mir eine Claude-Code-Statusline analog zu Max Fraunhofers Setup. Bevor du loslegst, drei Pre-Flight-Checks:

1. `jq` installiert? — `command -v jq` checken. Wenn nicht: zeig mir den passenden Install-Command (macOS: `brew install jq`, Debian/Ubuntu: `sudo apt install -y jq`, Fedora: `sudo dnf install jq`, Arch: `sudo pacman -S jq`, Windows: `scoop install jq`) und frag, ob du's für mich ausführen sollst.

2. Frag mich nach meinem Claude-Plan, um die Token-Budgets zu setzen. Schlag mir diese Werte vor und lass mich wählen (Default: Max 5x, weil das meistens stimmt):
   - Pro:    TOKEN_BUDGET=50000,  WEEKLY_TOKEN_BUDGET=null  (Pro hat kein Wochen-Limit, dann zweite Bar weglassen)
   - Max 5x: TOKEN_BUDGET=200000, WEEKLY_TOKEN_BUDGET=2000000
   - Max 20x: TOKEN_BUDGET=800000, WEEKLY_TOKEN_BUDGET=8000000
   Wenn ich's nicht weiss: Default setzen und einen Kommentar im Script lassen, wo ich's später anpasse.

3. Statusline-JSON-Schema checken: ruf `claude --print --output-format json --include-partial-messages "echo"` oder das aktuelle Doc-Beispiel ab und schau, ob die Felder `rate_limits.five_hour`/`seven_day` und `context_window` drin sind. Wenn nicht: kurz warnen, dass meine Claude-Code-Version eventuell zu alt ist — Script läuft trotzdem, zeigt nur weniger.

Dann zum Bau. Zwei Zeilen Output:

Zeile 1 (dim, grau): model | ctx XX% | git-branch | session-name
Zeile 2+3 (Akzentfarbe, RGB konfigurierbar): zwei Rate-Limit-Bars
  [5h] [████░░░░░░░░░░░░░░░░] 20% (~40k/200k tokens) | reset in 2h15m @ 14:30 CEST | $1.23
  [7d] [██████░░░░░░░░░░░░░░] 30% (~600k/2M tokens) | resets Sun 09:00 CEST

Spec:
- Datei: ~/.claude/statusline-command.sh, ausführbar, shebang /bin/sh (POSIX, kein bash-ismus).
- Liest JSON von stdin via jq. Felder: .model.display_name, .context_window.used_percentage,
  .workspace.current_dir, .worktree.branch, .session_name, .rate_limits.five_hour.{used_percentage,resets_at},
  .rate_limits.seven_day.{used_percentage,resets_at}, .cost.total_cost_usd.
- Konstanten am Datei-Anfang: TOKEN_BUDGET, WEEKLY_TOKEN_BUDGET (aus Pre-Flight 2), ACCENT_RGB="213;0;28".
- Progress-Bar: 20 Zellen breit, ausschliesslich █ und ░ (KEINE Emojis, KEINE Auto-Icons).
- Token-Schaetzung: pct/100 * Budget, mit k/M-Suffix.
- Reset-Strings in TZ=Europe/Berlin, mit `date -r` (macOS) UND `date -d "@ts"` (Linux) als Fallback.
- Labels [5h] und [7d] fix in eckigen Klammern, damit beide Bars vertikal aligned sind.
- ANSI: \033[2m fuer dim, \033[38;2;${ACCENT_RGB}m fuer Akzent, \033[0m reset.
- Wenn ein Wert fehlt: Zeile/Segment skippen, nicht crashen.

Danach patche ~/.claude/settings.json:
  "statusLine": { "type": "command", "command": "sh /Users/<user>/.claude/statusline-command.sh" }

(Pfad mit `echo $HOME` ermitteln, nicht hardcoden.)

Zeig mir am Schluss einen Test-Run mit Dummy-JSON, damit ich sehe wie es rendert.
Tip: If your editor mangles the prompt with smart quotes, park it in a plain-text editor first. The `backticks` and ${...} have to stay exactly as they are.
04Settings patch

What Claude writes into your settings.json — briefly explained.

The second part of the prompt patches ~/.claude/settings.json. If you already have one and want to handle this yourself, here's the entry:

settings.json — the one block that has to go in
{
  "statusLine": {
    "type": "command",
    "command": "sh /Users/YOUR-USER/.claude/statusline-command.sh"
  }
}
Path: YOUR-USER is your home directory name. In the terminal, type echo $HOME — that's the path up to /.claude/. On Windows WSL it lives under /home/your-user/.claude/.
Claude Code calls this script on every status line refresh, pipes its state as JSON into stdin, and renders what comes out. First appearance: in the terminal session where you submitted the prompt, the bar usually shows up right away. In new terminals just restart claude — then it sits at the bottom and stays there while you work.
One thing that throws you for a second: the bars don't update in the background. Claude Code only refreshes the status line when it has just finished a turn. If you want to see whether a reset has kicked in or your last prompt is counted — type /status, or just send the next prompt. Then it pulls fresh state.
05What to tweak

Three constants at the top of the script — the rest is taste.

Once the bars are running for the first time, these are the things you most often touch.

TOKEN_BUDGET=200000
Your 5h token budget per plan. Max 5× ~ 200,000. Pro plan ~50,000. If you don't know what you've got — work for an hour, see where the bar lands, calibrate the value.
WEEKLY_TOKEN_BUDGET=2000000
7-day budget. Max 5× ~ 2M tokens per week. If Claude doesn't pass the 7-day limit through to you at all, comment out the second line — that happens when your plan has no weekly cap.
ACCENT_RGB="213;0;28"
Accent color of the bars in RGB. Default here is Porsche red (fits my setup). For other looks: VS Code blue "0;120;212", Solarized magenta "211;54;130", GitHub green "35;134;54".
Race variant
If clean feels too dry: bar with car + dust trail + finish flag. Swap out the build_bar() function in the script — the last block 🏎 moves left to right, 💨 trails behind it, at 100% you get 🏁🏆. Sounds silly, is honestly nice while working — mine runs like that. Just tell Claude: "Build the bar like the clean variant, but with car trail and finish flag."
Punchline

Your tokens are expensive. Treat them that way.

The default status line says "Claude is running". This one turns "where did my tokens go?" into "60 minutes to reset, I can still ship two PRs."

Two minutes of setup. After that you stop running blind into the limit.

Sources + further reading