Monitoring Claude Code usage in real time

Historical usage tells you what happened. A monitor tells you what is about to. The difference matters because the cost of hitting a limit is not the limit, it is losing the turn you were in the middle of and inheriting a half-finished working tree.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Real-time monitoring means reading the live rate_limits percentages Claude Code publishes, sampling them over time to derive a burn rate, and projecting when the window closes. Session-file parsers cannot do this because plan state is never written to disk. The supported local source is the JSON Claude Code pipes to your status line command, which carries five_hour and seven_day percentages and reset times.

What you need to know
  • Plan state arrives in the status line JSON, not in the session files.
  • A useful monitor shows percentage used and time to exhaustion, not just a number.
  • Burn rate is the derivative: how fast the window is closing at your current pace.
  • Both windows need watching. The weekly one is what ambushes people.
  • The point is to finish the turn you are in, not to be told after the fact.

Where live quota data comes from

This is the structural fact that explains every gap in usage tooling, and it changed recently enough that most advice on the internet is wrong about it.

The three sources, and what each can answer.

SourceContainsCan answer
Status line JSON on stdinrate_limits.five_hour and rate_limits.seven_day percentages and reset times"How much is left, right now?"
/usage screenThe same bars, drawn interactively"How much is left, when I ask?"
JSONL session transcriptsToken counts per request, timestamped"What has this cost?"
The fields, from the documented status line schema.
{
  "rate_limits": {
    "five_hour": { "used_percentage": 23.5, "resets_at": 1738425600 },
    "seven_day": { "used_percentage": 41.2, "resets_at": 1738857600 }
  }
}

The three numbers worth showing

  1. Percentage used, per window. This is given to you directly, so there is nothing to compute.
  2. Burn rate. Consumption per hour at the current pace. This is what turns a static reading into a prediction.
  3. Time to exhaustion. Headroom divided by burn rate, compared against time to reset. The only one of the three that changes a decision.

A gauge showing 60 percent used means nothing on its own. Sixty percent used, burning 25 percent an hour, with 96 minutes left in the window, means the window resets before you run out and you can start the big refactor. Same reading, opposite decision, and the difference is arithmetic you have to do yourself because nothing does it for you.

A quota chart at sixty percent used, with two projected slopes: a fast one hitting the limit before the window resets and a steady one that does not100%0LIMIT60% used30m agonow+60mreset +96m40%/hr, exhausted at +60m18%/hr, the window resets firstSixty percent used is not a number. Sixty percent and a slope is a decision.

Build a predictive monitor in twenty lines

Claude Code gives you a percentage but not a trend, because it hands your script one reading at a time. Keep your own samples and the trend falls out. This runs as a status line command, so it costs no screen space and no attention.

~/.claude/statusline.sh, then chmod +x it.
#!/usr/bin/env bash
# Live 5-hour quota with a burn-rate projection.
input=$(cat)
now=$(date +%s)

pct=$(jq -r '.rate_limits.five_hour.used_percentage // empty' <<< "$input")
reset=$(jq -r '.rate_limits.five_hour.resets_at // 0'          <<< "$input")
[ -z "$pct" ] && exit 0

# Keep a rolling 30 minutes of samples.
log="$HOME/.claude/quota-5h.log"
printf '%s %s\n' "$now" "$pct" >> "$log"
awk -v cut="$((now - 1800))" '$1 >= cut' "$log" > "$log.new" && mv "$log.new" "$log"

read -r t0 p0 < "$log"   # oldest sample still in the window

awk -v now="$now" -v t0="$t0" -v p="$pct" -v p0="$p0" -v reset="$reset" 'BEGIN {
  dt = now - t0
  if (dt < 120)     { printf "5h %.0f%% | warming up", p; exit }
  burn = (p - p0) * 3600 / dt            # percent per hour
  if (burn <= 0.5)  { printf "5h %.0f%% | steady", p; exit }
  eta  = (100 - p) / burn * 60           # minutes until exhausted
  left = (reset - now) / 60              # minutes until the window resets
  printf "5h %.0f%% | %.0f%%/hr | %s", p, burn,
         (eta < left ? sprintf("%.0fm left", eta) : "resets first")
}'
~/.claude/settings.json
{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "refreshInterval": 30
  }
}

Watching the right window

The two windows behave differently and need watching differently.

WindowResetsWarning you wantTypical surprise
5-hour rollingFive hours from your first messageAt 80 percent used, or 30 minutes outOne heavy morning
Weekly (seven_day)A fixed day and time on your accountAt 70 percent used, mid-weekSteady use, no single heavy day

The weekly cap is the one that ambushes people, precisely because nothing about any individual day looks alarming. Five ordinary days can exhaust it while every 5-hour window stayed comfortable, and the first sign is being blocked on a Thursday with no obvious cause. A monitor that only draws the 5-hour bar will never warn you about this.

When the projection lies

A burn rate assumes the next hour resembles the last twenty minutes. Five documented behaviors break that assumption, and each one moves the line the wrong way.

  • A cache miss after a break. Your first message back reprocesses the whole context. Cache lifetime is an hour on a subscription and five minutes on an API key or a cloud provider, so a long lunch produces one very expensive turn that is not a trend.
  • Compaction. /compact reads the conversation it is summarising, so it is itself a large request. Your burn rate spikes at exactly the moment you were trying to economise.
  • Agent teammates. Each one runs its own context window and keeps consuming until it exits. Anthropic puts agent teams at roughly 7x the tokens of a standard session when teammates run in plan mode, which no trailing average will see coming.
  • Scheduled tasks. These fire on their interval even while the session is idle, sending the full context each time. Your burn rate stays non-zero while you are at lunch.
  • Model switches. Moving between models changes the price per token by up to five times, so the same volume of work reads as a different rate.

The options

What each monitor can actually see, as of August 2026.

ToolLive quotaBurn rateWhere it lives
/usageYesNoInside the CLI, on request
A hand-written status lineYesIf you script itYour prompt
ccusage statuslineNo, spend onlyYesYour prompt
ccusage blocks --activeConsumption onlyYesA terminal window
Claude Code Usage MonitorYes, from rate_limitsYes, with forecastingA terminal window
ContinuumYesYesMenu bar, web, phone, watch

What to do with a warning

  • Under 50 percent used: nothing. Do the work.
  • 50 to 80 percent: do not start a long autonomous run you cannot finish inside the window.
  • Over 80 percent: drop to a cheaper model, finish the current task, commit.
  • Over 95 percent: commit now. Getting cut off mid-edit is the one genuinely costly outcome.
  • Weekly over 70 percent on a Tuesday: change something structural, not tactically. Clear more often, lower the default model, or move the batch work to an API key.

The habit worth building is committing before a window closes rather than after. An agent interrupted mid-edit leaves a working tree you then have to reason about, and that reconstruction, not the wait, is the real cost of a rate limit.

Questions people ask

Configure a status line command and read rate_limits.five_hour.used_percentage and rate_limits.seven_day.used_percentage from the JSON Claude Code pipes to it on stdin. For a point-in-time reading without setup, run /usage.

Because plan state is published to the status line and the /usage screen, and is never written to the JSONL session files ccusage parses. It is a data-availability limit, not an implementation gap.

Sample the used_percentage over time and divide the change by the elapsed hours. Twenty to thirty minutes of samples is enough to smooth the spikes. Divide the remaining headroom by that rate for time to exhaustion.

Around 80 percent used on the 5-hour window, which usually leaves enough time to finish and commit. For the weekly window, treat being past 70 percent before Wednesday as a signal to change something structural.

It was removed in ccusage v18.0.0. Use blocks --active for the current window with projections, or the ccusage statusline command, or a status line script that reads the rate_limits fields directly.

Not from Anthropic. Continuum mirrors live gauges and warnings to iPhone and Apple Watch from the machine running your sessions.

A status line script runs locally and consumes no API tokens. Anthropic notes that background functionality including status checks generates a small amount of traffic, typically under $0.04 per session.

The agent stops with the working tree in whatever state it reached. Nothing is corrupted, but you inherit a partial change to review, which is why committing before a window closes is worth the habit.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code: customize your status line
  2. Claude Code: manage costs effectively
  3. ccusage on GitHub
  4. Anthropic help: usage limits
Try it

Ninety minutes
of warning.

Continuum shows live quota, burn rate, and time to exhaustion for every account, in the menu bar and on your phone.

free app · your subscriptions · local-first