Releases: benabraham/claude-code-status-line
Release list
v5.6.1
What's Changed
Fixed
-
Status line no longer blank at session start. Claude Code sends
context_window.used_percentageasnulluntil the session has an
assistant message, and the script treated that as "no data at all" —
printing nothing until the first request/response.- The context segments (
progress_bar,percentage,tokens) are now
skipped while the percentage is unknown; the model badge, directory,
worktree, git and usage gauges render from the first frame. - No fabricated
0 %is shown — the system prompt and tool definitions
already occupy context and cannot be measured before the API answers,
which is why Claude Code reportsnullrather than zero. - The 5-hour and weekly gauges may still be empty for the first render
or two while Claude Code's background quota probe resolves, then fill in.
- The context segments (
-
Stray leading blank line when a
new_linesegment came before anything
that rendered. Deliberate blank separators (two consecutivenew_line
segments) are unaffected.
No configuration changes — existing SL_SEGMENTS values and custom theme
files work unchanged.
Full Changelog: v5.6.0...v5.6.1
v5.6.0
What's Changed
New Features
Personal deadline (SL_USAGE_DEADLINE) — pace usage against your own horizon instead of the API reset, for when your week ends before the window does (you stop Friday noon, but the weekly limit resets Saturday 22:00).
export SL_USAGE_DEADLINE='2026-08-14T12:00' # or '2026-08-14 12:00'Absolute ISO 8601, local time unless you add an offset. It applies to every usage window whose reset falls after it, and moves all three things the window end feeds:
| Without | With deadline Fri 12:00 |
|
|---|---|---|
| Reset label | → Sat 22:00 |
→ [Fri 12:00] |
| Gauge ratio & color | vs. Sat 22:00 | vs. Fri 12:00 |
| Burndown | ... then 1 d to renew |
... then 2 h to stop |
- Only the window end moves — usage still accumulated from the real window start, so the observed burn rate stays honest. What shrinks is the time left to spend the rest.
- The overridden end shows in square brackets so it never reads as an API reset.
- Burndown says
to stoprather thanto renew, since budget does not renew at your deadline; the Soon message drops the renewal reference entirely. - Ignored once in the past, beyond the API reset, or unparseable — the API value is the automatic fallback, so a stale deadline needs no cleanup.
Fixes
- Fixed a stale stdin JSON example in the README that made the script print nothing when copy-pasted.
No breaking changes — with SL_USAGE_DEADLINE unset, behaviour is identical to v5.5.0.
Full Changelog: v5.5.0...v5.6.0
v5.5.0
Added
usage_fable segment — a per-model weekly usage gauge, showing the separate weekly limit that /usage lists as its own row. Uses the same gauge styles, colors, and forward-looking ratio as usage_5hour / usage_weekly, and takes the same gauge and width options.
██ 94 % → 10:28 ██ 83 % → Sat 18:14 Fable ██ 77 % → Sat 21:59
└─ 5h ────────────┘ └─ weekly ──────────┘ └─ per-model ─────────────┘
Despite the name the segment is generic:
| Option | Values | Default | Description |
|---|---|---|---|
model |
model display name | Fable |
Which per-model limit to show (case-insensitive) |
only_current |
0/1 |
0 |
Show only while that model is active; also skips the usage request in other sessions |
label |
full/short/none |
full |
Label left of the gauge — Fable, F, or none. Text follows model= |
gauge |
vertical/blocks/none |
blocks |
Gauge style |
width |
even integer >= 2 | 4 |
Gauge width |
Changed
usage_fable is included in the default segment list. It is self-gating, so it stays invisible on accounts without a per-model weekly limit.
Limitations — please read
This segment cannot use the modern data path, and that has consequences worth knowing:
- Claude Code's stdin
rate_limitscarries onlyfive_hourandseven_day— no per-model data at all, verified live through CC 2.1.220. The only available source is the deprecated OAuth API. - It therefore costs a usage request. Disk-cached for
SL_USAGE_CACHE_DURATION(default 300 s), so roughly one request per 5 minutes, not one per render. Removeusage_fablefromSL_SEGMENTS, or setonly_current=1, and no extra request is made. - It will stop rendering when that API is removed. It fails silently rather than erroring.
- Whether you have a per-model cap at all depends on your account — plan tier, model access, and API/extra-usage settings all play into it, and those rules are Anthropic's to change. The segment models none of them: it renders whatever scoped limit the API returns and stays empty otherwise.
- Needs credentials (macOS Keychain or
~/.claude/.credentials.json); without them it renders nothing. - No burndown —
usage_burndownis driven by the sharedseven_daywindow only.
Full details in the README.
v5.4.0
What's Changed
New Features
- Fable model badge color: the
modelsegment now renders a distinct badge for Fable models using Nord red —#BF616A(nord11) on dark themes, a muted#A8505Aon light themes. Previously Fable fell back to the neutral default badge.- Customizable via the new
model_fabletheme key in your~/.claude/claude-code-theme.toml.
- Customizable via the new
Full Changelog: v5.3.0...v5.4.0
v5.3.0
What's Changed
Improvements
- Live effort detection via stdin
effort.level(CC 2.1.119+) — the canonical source. The model badge now reflects mid-session/effortchanges and correctly displays all levels includingmax. - Effort badge is now omitted entirely on models that don't support effort, instead of showing a fallback character.
Display Changes
model:effort=shortnow rendersL/M/H/X/MAX(wasL/M/H/Awith first-letter fallback for unknown values).xhigh→X(explicit, wasHvia fallback)max→MAX(was lowercasemax)autono longer appears — CC always resolves it to a concrete level
model:effort=fullnow renders the actual level name includingxhigh/max(waslow/medium/high/auto).
Removed
CLAUDE_CODE_EFFORT_LEVELenv var override and settings-file fallback. These were workarounds for a missing upstream feature. No user action required — stdin now provides the live level automatically.
Full Changelog: v5.2.1...v5.3.0
v5.2.1
What's Changed
Fixes
- Python 3.10 compatibility: replaced
datetime.UTC(3.11+) withdatetime.timezone.utc(available since 3.2). The script now runs on Python 3.10 — e.g. the default interpreter on Ubuntu 22.04 LTS. README updated to note thetomlipackage fallback for custom themes on 3.10.
Thanks to @vzoha for the contribution (#3)!
Full Changelog: v5.2.0...v5.2.1
v5.2.0
What's Changed
New Features
- Plugin system for custom segments: Extend the statusline with custom segments by dropping
.pyfiles into plugin directories (.claude/statusline/project-level,~/.claude/statusline/global). Each plugin definesregister(api)to register segments viaapi.add_segment(). The API providesfg(),bg(),text_color(),RESET, andBOLDfor themed ANSI output. Plugin errors are silently ignored. See README for a full example.
Improvements
- Raw JSON input from Claude Code now available to segment renderers via
ctx["data"](enables access tosession_id,cwd, and other fields) - Code style cleanup and formatting improvements
Full Changelog: v5.1.0...v5.2.0
v5.1.0
What's Changed
New Features
- Effort level display in model badge via
model:effort=short(L/M/H/A) ormodel:effort=full(low/medium/high/auto). Reads from settings files with precedence chain. Note:maxis session-only and cannot be detected. - Dump mode (
SL_DUMP=1) for development: logs every stdin JSON input with timestamp to/tmp/claude-statusline-dump.jsonl - Native rate_limits support: reads usage data directly from CC 2.1.80+ stdin JSON, eliminating OAuth API calls. Falls back to deprecated OAuth API for older CC versions.
Full Changelog: v5.0.0...v5.1.0
v5.0.0
What's Changed
⚠ Breaking Changes
model:effort option removed
- Claude Code now displays reasoning effort level natively
- If your
SL_SEGMENTSincludesmodel:effort=shortormodel:effort=full, remove the:effort=...part
Removed
get_effort_level()function andCLAUDE_CODE_EFFORT_LEVELenv var reading — no longer needed
Full Changelog: v4.13.1...v5.0.0
v4.13.1
What's Changed
Fixed
- Burndown noise suppression after weekly window reset — the relevance filter now scales inversely with the Bayesian trust factor, preventing misleading "may run out X sooner" warnings from stale or spiked utilization data in the first hours of a new window
Full Changelog: v4.13.0...v4.13.1