This is a substantial update of Claude Code Has a Power Meter. You Just Have to Wire It Up
Configurable HUD info with context bars and limits etc. Hyperlinks to the MR and pipeline, subagents running under the prompt, and Codex and Gemini working alongside Claude through agent-link.
TL;DR
/plugin marketplace add newell-paul/statusline-hud
/plugin install statusline-hud@statusline-hud
/statusline-hud
bash statusline-hud.sh --demo shows you the whole thing before you wire anything.
The JSON Hiding in the Statusline
Claude Code's statusline is just a shell command. JSON in on stdin, one line of text out.
And that JSON is pretty fat. Model, effort, context usage, both rate-limit windows, cost, prompt-cache stats, the open pull request for your branch, and the GitLab merge request too. All of it lands on every render.
There's just nothing showing it.
What the Bar Shows
The left half is where you are. The right half is what it's costing you. But you can have it in any order you want and comment out what you do not need in the SEGMENTS list. More on that later.
Where you are
- Git: branch,
↑N↓Nahead/behind,✗if dirty, then+156 −23lines changed this session - MR/PR badge:
🦊 !23 ✓or🐙 #42 ✓. Green tick when it's mergeable, red cross for conflicts, bare yellow while checks run,✎draft,⇄merged. Click it and the MR opens - Pipeline dot: 🟢 🔴 🟡 for the latest run on your branch, ✋ when it's waiting on a manual job. ⚪ if that run is for an older commit than your HEAD, so you never trust a green that isn't about your code
What it's costing you
- Model, coloured by tier, with the effort badge (
⚡Lothrough⚡Max), 🚀 for/fast, 💭 for extended thinking - Context-window bar
- 5-hour and 7-day rate-limit bars, with a reset countdown (
↺2h14m) on whichever is more constrained once it passes 60%
The bars are five cells drawn in eighths, so they visibly move within a tier. Context flips colour earlier than the rate limits on purpose: a full context degrades Claude's answers long before it blocks you.
Off by default, one line to turn on
- Cache hit ratio
↩97%. Cyan❄when the cached prefix has gone cold;❄4mwhile it's warm but about to lapse. Send a message before then and Claude Code reuses the prefix instead of rewriting it, which on a long session is tens of thousands of tokens - Session name and
⎇ worktree, for when you run several sessions or a subagent wanders off -
🤖 ×2, a running-subagent count on the main line. Off because the agent rows already show who's running - The flame:
🔥 $5.64 ($3.20/h). More on that below
Agents Get a Row Too
Claude Code already draws a row under the prompt for each running subagent. A second, tiny script wired in as subagentStatusLine restyles it: a glyph for the model (🧠 Opus, 🤖 Sonnet, 🐇 Haiku, 📖 Fable), the agent's name, its effort badge if it has one, a progress bar, tokens, elapsed time and what it's doing right now, updating as it goes. Every column is fixed width, so the rows line up. One row per agent, gone when it finishes.
The progress bar is the point. Claude Code sends no completion signal for a task, so the bar shows work done so far: tokens on a log scale, empty at 1k and full at 100k, and it never shrinks. A short job barely lights a cell; a long one fills the bar. If you'd rather watch how much of its fresh context window the agent is eating, AGENT_GAUGE=ctx swaps in a context bar instead.
One caveat. With CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 on, an agent Claude gives a name to becomes a teammate, and teammates keep the stock row. Nothing is broken; the panel never calls the script for them.
The Badges Are Links
The MR badge opens the merge request. The pipeline dot opens the pipeline. Cmd-click on a Mac, Ctrl-click elsewhere, and you're on the page without touching a browser tab first. This is the feature that stopped me leaving the terminal.
These use OSC 8 hyperlinks: wrap text in an escape sequence with a URL and the terminal makes it clickable. Claude Code passes the status line output through untouched, so the script just wraps the badge and the dot. Ghostty, iTerm2 all do it. Terminal.app doesn't.
Gemini and Codex
Claude Code can hand work to other CLIs through the agent-link MCP server. Each Claude session starts its own agent-link server, and that server spawns the gemini or codex process. Add it once:
claude mcp add agent-link -- npx agent-link-mcp
Then turn on the link segment in ~/.claude/statusline-hud.conf (off by default):
SEGMENTS=(git lines mr ci model link ctx rl5 rl7)
While a spawned CLI runs you get one glyph per agent, in purple, next to the model name:
| CLI | glyph |
|---|---|
| claude | 🤖 |
| codex | 🌀 |
| gemini | ♊ |
| aider | 🧩 |
| anything else | 🔗 |
Two Gemini agents and a Codex show as ♊ ♊ 🌀. The glyphs disappear when the process exits. It works by scanning the process table for children of this session's agent-link server, so there is no cache file. Swap the glyphs with LINK_CODEX="…" and LINK_GEMINI="…" in the conf.
Why not use claude-hud or ccstatusline instead?
Both are good, and both have more GitHub stars than this will ever get. If you want to see which tools are running right now, claude-hud does that and I don't. If you want powerline arrows, gradients and a TUI to configure it, ccstatusline does that and I don't.
Here's what I wanted instead.
One line. Both of them default to more. claude-hud opens on two rows and grows; ccstatusline's showcase is a multi-row powerline. I hate a busy status. The bar sits under every prompt I type for the whole session, and if it needs a second row it has stopped being a status and become a dashboard. Everything here had to earn its place on one line. The only additional lines are running agents.
The pipeline, not just the PR. claude-hud shows no PR at all. ccstatusline shows the PR and the checks on it, but nothing when there's no PR yet. This one shows the latest pipeline for the branch whether or not you've opened anything, on GitLab and GitHub, and both badges are clickable so you go straight to the page.
Footprint. Two bash scripts, under 50 KB between them. No Node, no Bun, no npx cold start on every render, no call home to a usage API. It runs the same on a locked-down server, a colleague's laptop and a container. About 60ms a render.
The plugin install symlinks the script into ~/.claude/, writes a starter conf, patches settings.json, and re-points itself after /plugin update. Add "refreshInterval": 30 while you're there so the git and MR segments don't go stale while the session idles.
The Whole Extension API
Every setting is a plain bash assignment in the CONFIG block, and the conf file overrides any of them. SEGMENTS is the control panel:
SEGMENTS=(dir git lines mr ci model agents ctx rl5 rl7 session worktree cache turn) # everything on
SEGMENTS=(git model ctx rl5) # minimal
Custom segments are just as plain. The conf file is sourced bash, so any seg_<name>() function defined there is a segment:
seg_k8s() { printf "\033[38;5;39m⎈ %s\033[0m" "$(kubectl config current-context 2>/dev/null)"; }
SEGMENTS=(git k8s model ctx rl5 rl7)
That's it. A function and a name in a list. No runtime, no plugin API, no rebuild.
The Flame, If You Want It
🔥 $5.64 ($3.20/h) is cumulative session spend from cost.total_cost_usd, with the burn rate alongside once the session is 30 seconds old. The total is what this session has cost. The rate is what the next hour will cost if you carry on as you are. Green under $5, amber to $20, red above, tuned for Max users. PAYG users paying list price should dial it down.
It's off by default. On Pro and Max the number is an estimate, not your bill, and I found the rate-limit bars answer the question I was actually asking.
But a dollar figure does something a percentage doesn't. You tend to notice when it goes into the red.
Acting on What You See
- When the context bar goes amber start thinking about /compact unless you have compact set to auto.
- When the 5h bar goes amber, ask whether this task still needs Fable or Opus.
- Pin routine slash commands to
model: haiku. Commit, lint, review-diff. None of these need Opus. - Use subagents for delegation. They get a fresh context window, not your full history, and their row under the prompt shows how much of it they've used.
- When the
❄countdown appears, send the next message rather than going for a coffee. - When a session has done its job,
/clearbefore the next task./compactif you want to keep the thread.
The data was always there. Now you can see it.
The repo is at github.com/newell-paul/statusline-hud. Issues and PRs welcome.


Top comments (3)
I like this, the line under the prompt is where I keep an eye on things, so the rate limits belong here. What does the script do when it can't get an answer, because a status line that goes stale is worse than no status line. Does it fall back to the last known value with a timestamp, or clear the field?
Thanks for the comment and feedback!
Neither, as it turns out. The script keeps no state and fetches nothing. It reads the JSON Claude Code hands it on every render, so the bar is as fresh as the last turn and corrects itself on the next.
You did get me thinking though. If a users logs in with an API key rather than a subscription plan, or on the very first render of a session, there are no rate limit figures and an empty bar is shown which is exactly the bad data you were warning about.
I will get a fix and some tests up. :)
Script này giải quyết đúng pain point thực tế: context switching giữa terminal và UI web để check MR/pipeline status. Việc gom hết vào một dòng prompt giúp giữ flow không bị gián đoạn — đặc biệt khi làm việc với multiple agents cùng lúc.
Một số điểm có thể cân nhắc thêm:
Thấy approach "one bash script" khá pragmatic thay vì viết wrapper phức tạp. Có plan open source không? (site: labagent .tech)
Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more