Omniscio

OmniscioGuidesStatus line examplesRate limit usage

Claude Code status line with your rate limit usage

This is Anthropic's rate limit usage example, printed here with the settings entry. Under it is what each window is, which logins ever see the data, and why the percentages a script prints can legitimately be missing. The fields it ignores — cost, context, git — each have their own page in this set.

Checked on November 26, 2026 against the Claude Code 2.1.332 documentation. By the Omniscio team. Updated .

What it shows

One row: the model in brackets, then each window the session has data for. Behind a gateway the spend limit joins them, in dollars when the gateway has reported them and as a percentage when it has not.

[Opus] | 5h: 24% 7d: 41%
[Opus] | 5h: 24% 7d: 41% spend: $314.12 / $500

The percentages are whole numbers because the script rounds them. With no limit data at all the row is just [Opus], and that is the documented output rather than a failure.

A gateway here means a Claude apps gateway: a self-hosted proxy an organization routes Claude Code through, which can set a spend limit for each person.

The full script

Save this as ~/.claude/statusline.sh. It is Anthropic's rate limit usage example, printed here so you do not have to assemble it from the documentation.

#!/bin/bash
input=$(cat)

MODEL=$(echo "$input" | jq -r '.model.display_name')
FIVE_H=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')
WEEK=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty')

LIMITS=""
[ -n "$FIVE_H" ] && LIMITS="5h: $(printf '%.0f' "$FIVE_H")%"
[ -n "$WEEK" ] && LIMITS="${LIMITS:+$LIMITS }7d: $(printf '%.0f' "$WEEK")%"

SPEND_PCT=$(echo "$input" | jq -r '.rate_limits.spend_limit.used_percentage // empty')
SPEND_USD=$(echo "$input" | jq -r '.rate_limits.spend_limit | select(.used_usd != null) | "$\(.used_usd) / $\(.limit_usd)"')
[ -n "$SPEND_PCT" ] && LIMITS="${LIMITS:+$LIMITS }spend: ${SPEND_USD:-$(printf '%.0f' "$SPEND_PCT")%}"

[ -n "$LIMITS" ] && echo "[$MODEL] | $LIMITS" || echo "[$MODEL]"

Then make it executable, because the command runs in a shell:

chmod +x ~/.claude/statusline.sh

The jq parser is a separate download from jqlang.org; check with jq --version before you blame an empty row on your login.

The // empty on every lookup is the important part. It emits nothing when the field is absent, so the shell test that follows simply skips the segment. Writing // 0 instead would print a confident 5h: 0% for a login that has no rate limit data at all.

The settings entry

Add this to ~/.claude/settings.json, or to a project's settings file if you want the row only there.

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh"
  }
}

Add the object beside whatever else the file holds, inside the same braces. Claude Code reloads settings and runs the script as soon as you save it, so there is nothing to restart.

You can usually skip refreshInterval, because a rate-limit window reset is itself a documented update trigger. The docs also note that event-driven triggers can go quiet on an idle session, so add it if you need the row to tick while the session sits idle.

What each field means

Your script gets one JSON object on stdin. This script reads two windows and an optional spend limit; here is what each piece actually holds.

The rate limit fields, and when each one is there.
FieldWhat it holds
rate_limits.five_hour.used_percentagePercentage of the rolling 5-hour window consumed, from 0 to 100
rate_limits.five_hour.resets_atUnix epoch seconds when that window resets
rate_limits.seven_day.used_percentagePercentage of the 7-day window consumed, the same 0 to 100 scale
rate_limits.spend_limit.used_percentage, resets_atBehind a Claude apps gateway, how much of the spend limit is used and when its period resets. These come with every response
rate_limits.spend_limit.used_usd, limit_usd, periodEstimated spend, the limit in dollars, and the period, one of daily, weekly or monthly. Read in a separate request about every five minutes, so they can trail the percentage and can be absent

The object is only sent to a claude.ai Pro, Max or Ultra subscriber, or behind a gateway that sets a spend limit for you, and only after the session's first API response. Even then, each window can be independently absent, and Claude Code drops a window once its resets_at time passes. Behind a gateway, spend_limit needs Claude Code v2.1.251 or later, and its dollar fields need v2.1.284 or later on both Claude Code and the gateway.

How to confirm it renders

A live login is not required to test the script. Pipe in mock JSON that carries the fields yourself:

echo '{"model":{"display_name":"Opus"},"rate_limits":{"five_hour":{"used_percentage":23.5,"resets_at":1738425600},"seven_day":{"used_percentage":41.2,"resets_at":1738857600}},"session_id":"test"}' | ~/.claude/statusline.sh

That should print [Opus] | 5h: 24% 7d: 41%. Feed it the same JSON without the rate_limits object and it should print [Opus]. The second run is the one that matters on an API key: it proves the absence is handled rather than printed as a zero.

Inside Claude Code, claude --debug logs the script's stderr on every invocation and its exit code on the first invocation in a session. In a live session, compare the row with the /usage command, which shows subscribers their plan usage bars.

Why the percentages are missing

This is the one script in the set whose row is usually correct when it looks empty. The data is conditional on the login and the moment, not on the script.

What you see, and what to check first.
What you seeCheck
Only [Opus], no percentagesYour login. A plain API-key login, not behind a spend-limit gateway, receives no rate_limits object
Percentages appear after a message or twoExpected. The object arrives only after the first API response in the session
One window is missingEach window is independently absent, and a window is dropped once its resets_at passes
The spend limit shows a percentage, not dollarsThe dollar fields are read separately about every five minutes; the percentage arrives first
The model is empty, or the row shows []jq is not installed. Check jq --version in the shell Claude Code uses
No row at allThe workspace trust dialog has been accepted for the folder, the script is executable, and it prints to stdout. Those checks are the same for every script in this set

For the limit itself rather than the status line — what happens when you reach one, and what resets it — the usage limits guide owns that.

More in this set

Each page carries a complete setup, not a fragment.

Where Omniscio fits

The status line is Claude Code's own, and nothing on this page needs Omniscio. Omniscio is a desktop app for running several Claude Code agents side by side, in one list rather than a wall of terminals.

Its agent sessions run Claude Code in print mode, so they show Omniscio's session list rather than a terminal row. A status line you configure still applies to any claude you run yourself in a terminal.

The features page lists what the app does today.

How this page was checked

Every statement here about Claude Code comes from Anthropic's own documentation, read in its Markdown form on November 26, 2026: the status line page, the settings reference, the costs page and the changelog. The version line comes from the changelog, whose newest release is 2.1.332, dated November 25, 2026.

The script is Anthropic's rate limit usage example, reproduced with its two explanatory comment lines removed and kept as prose on this page; apart from that and HTML entity escaping it is byte for byte the documented script. It was not written for this page and not run on our machine; where the page says what it prints, it is repeating what that example is documented to print.

What this page says about Omniscio comes from our own pages. If Anthropic's page and this one ever disagree about Claude Code, Anthropic's page is right.

Sources

Omniscio's own pages, for what this section says about this app:

Common questions

Why does my Claude Code status line show no rate limit percentages?

The rate_limits object is only present for a claude.ai Pro, Max or Ultra subscriber, or behind a Claude apps gateway that sets a spend limit, and only after the first API response in the session. Each window can be independently absent, and Claude Code drops a window once its resets_at time passes. On a plain API-key login, not behind a spend-limit gateway, the object is not sent at all, so Anthropic's rate limit example prints the model alone.

What do the 5-hour and 7-day percentages mean?

They are the percentage of each rolling rate limit window you have consumed, from 0 to 100. five_hour is the rolling 5-hour window and seven_day is the weekly one. Each also carries resets_at, the Unix epoch seconds when that window resets.

Does the status line update when a rate limit resets?

Yes. Alongside new assistant messages, a finished /compact, a permission mode change and the other triggers, Claude Code re-runs the script when a rate-limit window in the data it last received reaches its resets_at time.

Why is the spend limit shown as a percentage instead of dollars?

Behind a Claude apps gateway, used_percentage and resets_at arrive with every response, while used_usd, limit_usd and period are read in a separate request about every five minutes and can be absent. Anthropic's rate limit example prints the dollar form only when it is there and falls back to the percentage otherwise.

Run those Claude Code sessions from one window

Install Omniscio, keep your Claude Code sessions in one list, and see what each one needs without hunting through terminals. The features page lists what is in it today.