Set Up Your Claude Code Status Line (Almost Nobody Does This)
Here's a small one that pays off every single day.
Claude Code has a status line — the strip of text at the bottom of the terminal. Out of the box it's nearly empty, and almost nobody touches it. That's a shame, because it's the one piece of the UI that's on screen 100% of the time you're working. Most people leave it blank and then spend the rest of the session guessing at the exact things it could just tell them.
I ignored it for months. Now I won't run a session without it.
Why it's worth two minutes of your life
Three questions come up constantly when you're working with an agent, and the status line answers all of them without you asking:
- Which model am I actually on? Easy to think you're on one model and be on another after a
/modelswitch or a new session. When the answers start feeling off, the first thing you want to rule out is "oh, I'm on the wrong model." - How much context is left? As a session fills up, Claude eventually compacts the conversation to make room — and compaction is where detail gets blurry. Seeing context tick down means you can wrap up a thread, or start fresh, before the model quietly forgets the thing you told it twenty minutes ago.
- How close am I to a wall? Usage is metered over a rolling 5-hour window and a 7-day window. Nothing kills momentum like a long refactor dying halfway because you hit a limit you couldn't see coming. Having both numbers in view lets you decide should I start this big thing now, or is now a bad time?
Throw in the current directory and git branch and you also stop making the classic mistake: running exactly the right command in exactly the wrong repo or branch.
None of this is exotic. It's just information you're currently getting the hard way.
The setup: let Claude write it for you
Here's the part people don't realise. You don't hand-write a shell script. There's a command for this, and it takes plain English.
Type this into Claude Code:
/statusline show the model name, context remaining as a percent progress
bar, my 5-hour and 7-day rate-limit usage, the current directory, and the
git branch
That's it. The /statusline command reads your description, generates a small status-line script, saves it under ~/.claude/, and wires it into your settings for you. No shell scripting, no fiddling with config by hand.
Under the hood it drops a block like this into your settings.json — worth knowing it's there, but you never have to write it:
{
"statusLine": {
"type": "command",
"command": "bash ~/.claude/statusline.sh"
}
}
Claude Code feeds that script a little bundle of data on every update — the model, your directory, git info, how much of the context window is used, your usage figures — and the script turns it into the line you see. The /statusline command just writes that script so you don't have to.
What you end up looking at
A line that reads, roughly:
Opus 4.8 ▕████████░░░░▏ 63% left 5h ▕███░░░░░░░▏ 31% 7d ▕█████░░░░░▏ 52% ~/dev/tooltwistweb main
Now it's all just there. The context bar becomes your "time to /compact or start a fresh session" gauge. The two usage bars become your "is now a good time to start something big" gauge. And main sitting on the right is a quiet little guard against committing to the wrong branch.
A couple of honest notes
- Rate-limit numbers need a recent build. The 5-hour and 7-day figures are a newer addition to what the status line can show. If those bars don't appear after you set it up, update Claude Code and re-run the command.
- It's completely reversible.
/statusline deleteputs it back to default. And you can re-run/statuslineany time with a different description to add, drop, or reorder things — try a few wordings until the line reads the way your brain likes it. - You can go further. There are community status lines (some built on usage-tracking tools) that add cost-per-session, burn rate, and more. Nice if you want them — but the built-in command covers everything above with zero setup, which is the whole point.
Two minutes, one command. After that, the three things you used to guess at are just always on the screen — right where you're already looking.