Long sessions die silently. Context fills up, the model quietly starts forgetting — and you don't notice until it loses the thread. So I had Claude Code build its own fuel gauge: model, effort, and two live bars, on one row.
If you run Claude Code all day, you know the moment: an hour deep into a build, the model starts forgetting things it said ten minutes ago. The context window filled up and nothing warned you. The default status line tells you almost nothing — so you fly blind until the AI loses the plot, mid-task, with no fuel light on the dash.
Claude Code hands a small statusline JSON to a script on every refresh — model, effort, context used, session tokens, last prompt. I asked the AI to read that and render a cockpit row: Opus 4.8 [high] [███░░░]13% contxt [██░░░░]13% sess.token. Two ASCII fuel bars. It wrote, tested, and installed the whole thing in one pass.
No magic. Claude Code pipes a tiny JSON object to your script's stdin; whatever the script prints becomes the status line. Read the fields, do the math, draw the bars. Here's the shape of the data the script reads on every redraw — the raw "how it works" layer.
The bars are an estimate, not a fuel-injection readout. context_used_pct tracks the window; the session-token bar is cumulative spend against a cap you set. Treat them as a dashboard light, not a lab instrument — when context crosses ~80%, that's your cue to /compact or start fresh, not a hard cliff.
From a fresh 0% start to the ~80% "time to compact" zone, plus the raw data behind it. Tap any image to enlarge it and read the exact prompt that drew it.




The bars climb as I work. When context crosses the line, I /compact on purpose instead of getting caught out. The AI built its own fuel gauge — and now it tells me when its own tank is running low.
Watch the bars climb during a real session — and the one prompt that built the whole gauge.
The status line script, the settings.json wiring, and the two-bar renderer. Everything in this episode is free and open — clone it, run it, make it yours.
# statusline repo publishing soon — comment FUEL on the post for early access
No GitHub? Comment FUEL on the post and the bot DMs you the link.
Same fuel gauge, same control — but the terminal and a Telegram bot win on every real task. I stopped opening the desktop app. Here's why.