Skip to content

Releases

v2.29.0

Choose a tag to compare

@github-actions github-actions released this 05 Dec 12:53

The agent panel rows move to a Claude Code mod, and an expired usage window no longer shows an old number. Thanks to @ArtMin96 (#74).

Added

  • status-bar-agent-rows mod. Claude Code 2.1.326 deprecated the subagentStatusLine setting in favour of mods and warns at startup while it is set. The agent panel rows (status icon, elapsed time, tokens and a live tok/s rate per subagent) now ship as a mod in mods/agent-rows, listed in this repo's marketplace. Install it with /plugin install status-bar-agent-rows@claude-code-status-bar. It reads subagent_rows from statusline.conf like before. statusline-subagent.js stays for Claude Code older than 2.1.326.

Changed

  • The installers no longer write subagentStatusLine. On Claude Code 2.1.326+ they remove the entry they wrote earlier (only their own; a custom one is left alone), so the startup warning goes away.

Fixed

  • An expired usage window is dropped. A usage cache that outlived its window (failed fetches, a machine off for days, or a plan whose 5h limit was removed) showed the old number at the next session start, before Claude Code sends its own rate_limits. A window whose reset time has passed is now hidden.
  • Agent rows (in the mod): zero readings before an agent's first request no longer count as burn (they inflated tok/s and flattened the sparkline), and a narrow row gives the description the whole width once the numbers are dropped.

Internal

  • New tests/usage_expired.bats (4) and mod tests in mods/agent-rows/hooks/agent-rows.test.ts. Suite 256.

v2.28.0

Choose a tag to compare

@github-actions github-actions released this 04 Dec 11:31

An opt-in session file so other local tools can see each session's real context window. Off by default; the bar itself is unchanged either way.

Added

  • session_file (opt-in, default false). Claude Code tells only the status line the real context window size (1M vs 200k or 400k); hooks never see it, so a terminal panel showing context use had no way to know it. With session_file=true the script keeps ~/.claude/.statusline-sessions/<session_id>.json up to date as one line of JSON: {"session_id":"…","context_window_size":1000000,"total_input_tokens":257000,"used_percentage":26,"compact_at":967000,"cwd":"C:\\laragon\\www\\loadout","at":<epoch seconds>}. total_input_tokens is the tokens in context now (Claude Code 2.1.132+); compact_at is the token count where auto-compact fires, worked out exactly as for the context bar's │ marker (CLAUDE_CODE_AUTO_COMPACT_WINDOW, then autoCompactWindow in settings.json, then the full window, minus 33,000) and null when DISABLE_AUTO_COMPACT or DISABLE_COMPACT is set. Any value Claude Code didn't send is null, never a guess, and Windows paths are JSON-escaped.
  • The file is written only when a value changes (at is the time of that change), so an idle render reads the old file with a shell builtin and starts no program. A change writes a temp file and renames it over the old one, so a reader never sees half a file. It is written after the bar has printed, and any failure is ignored, so the output can't change. Files untouched for 7 days are swept by the existing background cache sweep, and --uninstall removes the folder. --dump-config lists the key.

Internal

  • The auto-compact point is now worked out by one helper (calc_compact_tokens) shared by the context bar and the session file; the bar's output is byte-identical.
  • 9 new tests in tests/session_file.bats (off by default, the exact JSON written, the bar's output unchanged with it on, no rewrite when nothing changed, a Windows path as valid JSON, nulls for a missing context_window, compact_at under the env override, with compaction off and with the context bar hidden, no file without a session_id, --uninstall). Suite 252.

v2.27.1

Choose a tag to compare

@github-actions github-actions released this 01 Dec 11:57

Two bug fixes from community reports.

Fixed

  • The usage fetch sends your Claude login token, not an MCP server's token. Claude Code keeps OAuth tokens for MCP servers (mcpOAuth) in the same Keychain item and credentials file as its own login (claudeAiOauth), and they can come first. The script took the first accessToken it found, so once any MCP server was authorised it sent that (often long expired) token, got a 401 and stayed in backoff: the OAuth 5h/7d fallback and the model-scoped weekly swap stopped updating. The token is now read from the claudeAiOauth entry; files without one keep the old read. Thanks to @m1sk9 (#71).
  • CLAUDE_CONFIG_DIR is honoured. The script always used ~/.claude, while Claude Code and the /setup and /configure commands use CLAUDE_CONFIG_DIR when set, so settings saved by /configure never applied. The script and both installers now use CLAUDE_CONFIG_DIR when set, else ~/.claude (#72, reported by @atarutin). If you point CLAUDE_CONFIG_DIR at a second profile but the bar is installed only in ~/.claude, the script keeps using ~/.claude, so that setup is unchanged.
  • The /configure preview shows your pending settings. It wrote them to a randomly named temp file the script never looked for, so the preview always showed the defaults. It now writes statusline.conf into a temp folder passed as CLAUDE_CONFIG_DIR, and sets COLUMNS so segments are not cut.

Internal

  • New tests/oauth_token.bats (3) and tests/config_dir.bats (7). The test sandbox unsets CLAUDE_CONFIG_DIR. Suite 243.

v2.27.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 16:29

Closes the four performance items left over from the November audit: no program at all runs inside the render any more, a cold start on a long transcript is cheap, cache files can never be read half-written, and a busy render starts its background work with one spawn instead of several.

Changed

  • The first render in a folder no longer runs git inside the render. It was the last native program started in the render's process tree, so a cancelled render at the wrong instant could still strand one git.exe on Windows, and a cold probe slower than the refresh interval was cancelled and restarted every tick. The probe now runs detached under the folder's lock and the render waits up to two seconds for its result, so the branch still shows at once in the normal case; a slower probe (huge or network repo) finishes in the background and shows on the next render. A render that finds another render's probe already running waits for that result instead of starting a second git. git_cache_seconds=0 keeps the old per-render git.
  • A cold start parses only the tail of the transcript. The first helper run on a transcript with no parse cache (or one that grew by more than the cap since the last run) reads only the last 4 MB instead of the whole file; a 68 MB transcript used to take several seconds and 363 MB. The line only ever shows the last 30 tools, running items and the last five minutes, so nothing visible is lost; a todo list begun before the cut can show short until the next TodoWrite.
  • Background jobs due in the same render start with one spawn. The git refresh, the activity helper and the update, usage and status fetches are queued during the render and started together, in parallel, by a single detached spawn just before the bar prints (git refresh and the helper are both due in about half of busy renders, each costing a fork pair on Windows).

Fixed

  • The activity cache and the parsed-transcript cache are written through a temp file and a rename, so a render can no longer read a half-written cache and drop line 2 for one refresh. If Windows refuses the rename (a reader holding the file open) the helper falls back to a direct write, so nothing is lost either way.

Internal

  • 3 new tests in tests/git_cache.bats (a slow cold probe does not block the render and shows next time; a cold render waits for another render's probe instead of starting git; git refresh and the helper due together both run) and 4 in tests/activity.bats (cold tail parse under the cap, a small transcript parsed whole, re-parse from the tail after growing past the cap, no temp leftovers). Suite 233. STATUSLINE_GIT_COLD_WAIT_TICKS and STATUSLINE_COLD_PARSE_BYTES are test-only env overrides.

v2.26.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 14:50

The activity helper no longer restarts every refresh while a tool or subagent is running. With many sessions open that was the largest remaining load after 2.25.0.

Changed

  • Live elapsed timers are now rendered by the bash script, not the helper. The helper used to write a fixed "12s" into the activity line and ask to be re-run one second later, so while anything was running every render of every session started Node (100 to 350 ms of CPU and about 100 MB each). The bash script now passes --live, the helper leaves a small slot ({T<start>} for a tool, {A<start>} for a subagent) and the script fills it from its own clock on every render: the timer, its heat colour and the "..." to "12s" switch all advance with no helper run. The helper now runs only when the transcript changes. The line looks the same; the only visible difference is that two tools both under 5 seconds each get their own "..." instead of one at the end. An older helper ignores the flag and ticks itself as before; an older script never passes it, so the helper's output is unchanged for it.
  • Slot lookalikes in untrusted text (a command containing {T123}) are defused like the colour tokens.

Fixed

  • The token segment no longer reads 0k out all day. Claude Code fills total_output_tokens from the most recent API response (the size of one reply, typically a few hundred tokens), and the segment rounded to whole thousands. Counts under 1k are now shown exactly and 1k to 9.9k with one decimal (348k in 820 out, 1.2k out); the README says what the two numbers mean.

Internal

  • 6 new tests in tests/activity.bats (slot emitted, old output unchanged without the flag, the bash fill with "..." under 5 s, no re-spawn while a tool runs, heat colour from the computed elapsed, defused lookalike) and 1 in tests/segments.bats (token formatting). Suite 226.

v2.25.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 11:07

Fixes a Windows process leak that could fill a PC with stuck git.exe, curl.exe and node.exe processes, and makes the bar much lighter with many sessions open.

Fixed

  • Windows: no more stuck suspended processes after a cancelled render. Claude Code cancels an in-flight status line run whenever the next one starts, and on Windows it kills the whole process tree (taskkill /T /F). Git Bash starts a native program (git, curl, node) suspended and resumes it a moment later; a tree kill in between left the child suspended forever, holding memory with no parent. One PC collected 416 git.exe (~2.5 GB) in a day with eight sessions on a 3-second refresh, plus curl.exe from the Claude status fetch and node.exe from the activity helper (~83 MB each). Every background job now starts through a double fork in its own process group (spawn_detached), so neither the Windows tree kill nor the Linux/macOS process-group kill can reach it, and git normally runs only in the background (below). A repro harness that cancels renders exactly like Claude Code went from 3 stuck processes per 400 cancels to 0. Details and the full audit: docs/performance-audit-2026-11.md.
  • A failing background fetch is no longer retried on every render. When the update check, the usage API or the Claude status page failed (offline, blocked), nothing was cached, so every render of every session started another curl. Each fetch now runs at most once per 30 seconds across all sessions (a small claim file, fork-free). In a 4-session test the Claude status fetch dropped from 22 curl runs a minute to 3.
  • The parsed-transcript cache no longer grows forever. Files for transcripts untouched for 7 days are swept (one install had 269 files from five months).
  • A claim file stamped in the future can no longer pin a fetch or the helper. After a clock step backwards (NTP correction, VM restore) a claim written just before the step was treated as fresh until the clock caught up, silently suppressing the update check, the status fetch and the activity helper. A future stamp now reads as expired (found in the pre-release audit).
  • --uninstall now also removes statusline.conf.example and the .statusline-autoupdate.lock directory, and lists the cache and claim files it deletes.

Added

  • Git result cache (git_cache_seconds, default 5). Each folder's branch, dirty count and ahead/behind are cached in ~/.claude/.statusline-git-cache.<hash> and shared by every session. A fresh result is used as is; an older one is still shown while a background job refreshes it (one per folder at a time). The render itself only runs git with no result at all: the first render in a folder, or after a git setting changes. A branch switch or new file can show up a few seconds late; git_cache_seconds=0 runs git on every render as before. A warm render now starts no outside program at all (stdin is read with bash's mapfile; bash 3.2 keeps cat) instead of four.
  • --dump-config now also lists git_untracked and git_timeout (they were missing).

Changed

  • The activity helper runs once per session at a time: while a run is in flight, a render neither starts another nor overwrites the cache with the old line.
  • NOW_EPOCH comes from bash's $EPOCHSECONDS when available (bash 5, including Git Bash), saving a date process per render. Stock macOS bash 3.2 still uses date.
  • --uninstall also removes the git caches and claim files.
  • The git cache and claim files are stamped with the time they are written, not the render's start time, so on a loaded PC (where a render can take seconds) a fresh result no longer looks stale on the very next render with a refresh permanently in flight.
  • An old result is shown however old it is (for one render, while a background refresh runs) instead of the render running git itself after 5 minutes idle. On a loaded PC a cold in-render probe could take over 3 seconds, be cancelled by the next tick before it wrote the cache, and repeat every tick; it also meant 16 git.exe at once when eight sessions woke in the same folder. The in-render probe now only happens with no result at all (first render in a folder, or after a git setting change) and takes the folder's lock. A git cache path that is a directory is left alone instead of collecting temp files.
  • A background job releases only the claim it took (a token in the claim file), so a hung job that outlived its claim can't free a newer holder's lock, and jobs run with set +e so cleanup is always reached.

Docs

  • README: config note on the git cache, troubleshooting entries (git lag, and a PowerShell one-liner to clear leftover suspended processes from older versions), updated files table, "How it works" diagram and security note. statusline.conf.example, the /configure wizard appendix and the web configurator (Behaviour panel) document git_cache_seconds. New docs/performance-audit-2026-11.md.

Internal

  • New tests/git_cache.bats (18 tests: cache write and reuse, stale-while-refresh, a result hours old still shown, one refresh in flight, git_cache_seconds=0, settings-change invalidation, non-repo folders, --dump-config, fetch claim and its expiry, a future-stamped claim, the update-check throttle, a hash collision, a stale result shown while another render holds the lock, helper in flight, a stale helper lock, and --uninstall). Suite 219.
  • tests/test_helper.bash pins a UTF-8 locale when the shell has none (Git Bash with LANG unset counted … as 3 bytes and failed the line-2 width test locally; CI runners were unaffected).
  • Pre-release audit by four independent reviewers (bash correctness and races under bash 3.2 and 5, render performance, security of the new cache and claim files, docs and release consistency); the fixes above came from it.

v2.24.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 12:05

Makes the weekly bar honest for accounts with per-model weekly limits: it now shows whichever weekly limit will actually throttle you.

Added

  • Model-scoped weekly limit swap (usage_scoped, on by default). Some plans carry a per-model weekly cap alongside the all-models one — the "Fable" or "Opus" row on claude.ai's usage page. When that scoped cap is running higher than the all-models weekly (i.e. it binds first), the wk bar swaps to it and names the model: wk:Fable (3d17h) ███░│░░ 36%. The pacing marker, countdown label, and burn-rate forecast all compute on the swapped numbers, so the ▲time-to-limit warning tracks the limit you'll actually hit. At or below the all-models level the plain wk bar stays; the segment keeps its name/slot so layouts and truncation are unaffected.
    • Data source. Claude Code (through 2.1.177) does not forward scoped limits on stdin; they only exist in the OAuth usage API's limits[] array. The existing background OAuth fetch (10-min cache, exponential backoff, fully detached, zero hot-path forks) now also runs on stdin-native Claude Code to read that entry. The stdin 5h/7d numbers are never overwritten — the cache is read solely for the weekly_scoped entry.
    • Fail-silent everywhere. No usable token (API-key sessions, setup-token CI tokens), a failed fetch, or a missing limits[] entry simply leaves the plain all-models bar — no prompt, no error, no render delay. A staleness ceiling (6× usage_cache_seconds, ≈1h default) keeps a dead cache from swapping the bar onto ancient numbers, and a ~ suffix marks a swapped value that's more than two refresh intervals old. The model name is sanitize()d and capped at 12 chars. Set usage_scoped=false for the plain all-models bar always (this also skips the background fetch when stdin covers the numbers).
    • Fewer wasted forks. A token-less machine now writes the same exponential backoff marker as a failed fetch, so it stops re-spawning a doomed fetch subshell on every render (at most one attempt per 30 min).

Docs

  • README: Highlights entry, usage-section explainer, updated "Where the usage data comes from" (the OAuth path is now fallback + scoped-limit source), Segments-table row, and the fail-silent note. statusline.conf.example and the /configure wizard document the new key. The web configurator gains a "Model-scoped weekly swap" toggle plus a "Scoped weekly %" sample slider so the swap previews live (wk: prefix follows the sample model).

Internal

  • New tests/usage_scoped.bats (11 tests: default-on registration, swap/no-swap policy including the equal case, usage_scoped=false, staleness ceiling, OAuth-fallback path, stdin numbers untouched, missing display_name, control-byte sanitization, no-cache no-op). --demo pins usage_scoped=false so theme previews stay deterministic regardless of the machine's real account state. Suite 201.

Fixed

  • Windows paths no longer render with doubled backslashes (e.g. C:\\laragon\\www\\project instead of C:\laragon\www\project). Claude Code feeds the status bar its data as JSON, which escapes every backslash in a Windows path as \\. The bar parses JSON with bash regex (no jq, by design) and was emitting the captured string verbatim, so the JSON \\ separators showed through as literal doubled backslashes. The string extractor (extract_from) now decodes JSON string escapes (\\→\, \/→/, \"→", plus \n \t \r \b \f) via a new single-pass, fork-free json_unescape helper. A fast-path returns the value untouched when it contains no backslash, so macOS/Linux paths and every other field pay nothing. The decode is a left-to-right scan (not a naive global replace) so adjacent escapes — consecutive separators and UNC \\\\server prefixes — decode correctly. macOS/Linux were never affected (forward-slash paths aren't escaped in JSON). 2 new tests in tests/segments.bats. Suite 190.

v2.23.2

Choose a tag to compare

@github-actions github-actions released this 25 Jun 12:59

Fixed

  • Windows paths no longer render with doubled backslashes (e.g. C:\\laragon\\www\\project instead of C:\laragon\www\project). Claude Code feeds the status bar its data as JSON, which escapes every backslash in a Windows path as \\. The bar parses JSON with bash regex (no jq, by design) and was emitting the captured string verbatim, so the JSON \\ separators showed through as literal doubled backslashes. The string extractor (extract_from) now decodes JSON string escapes (\\→\, \/→/, \"→", plus \n \t \r \b \f) via a new single-pass, fork-free json_unescape helper. A fast-path returns the value untouched when it contains no backslash, so macOS/Linux paths and every other field pay nothing. The decode is a left-to-right scan (not a naive global replace) so adjacent escapes — consecutive separators and UNC \\\\server prefixes — decode correctly. macOS/Linux were never affected (forward-slash paths aren't escaped in JSON). 2 new tests in tests/segments.bats. Suite 190.

v2.23.1

Choose a tag to compare

@github-actions github-actions released this 24 Jun 07:52

Fixed

  • Claude API status no longer shows a persistent false "critical outage" for a mitigated incident. v2.23.0 polled summary.json and took the worst-of (page indicator, any open incident's impact) to catch incidents the page-wide indicator under-reports. In practice that over-reported: a long-lived monitoring-state incident (components already recovered, e.g. a multi-day model/feature suspension) kept the badge pinned to ● Claude: critical outage even though every component was operational and requests worked. The segment now polls status.json and trusts the page's current overall indicator (which Statuspage derives from live component health), and deliberately does NOT escalate on open incidents. The badge now reflects whether Claude is degraded right now, the actionable early-warning, and a mitigated/monitoring incident correctly reads as healthy. The fetch is smaller too (~190 B vs ~5 KB). tests/claude_status.bats updated (the under-report fixture now asserts the incident is intentionally not surfaced); suite 188.

v2.23.0

Choose a tag to compare

@github-actions github-actions released this 24 Jun 06:38

Adds an opt-in early-warning for Claude API degradation, built on the same never-block background-fetch pattern as the update check, so it costs nothing on the render path.

Added

  • Claude API status segment (show_claude_status, off by default). A degraded-only badge fed by the public status.claude.com Atlassian Statuspage. It shows ● Claude: major outage / critical, ▲ Claude: degraded, or ◷ Claude: maintenance only when Claude is degraded, and nothing when healthy (like the update notice). It polls summary.json in a fully-detached background subshell on a configurable interval (claude_status_cache_seconds, default 300s) and caches a single token, so the render only ever reads a tiny cache: zero forks on the hot path, never blocks. The tier floor claude_status_min (default major) keeps it quiet for everything but request-breaking outages; set minor to also surface minor degradation and maintenance windows. The badge links to the status page when pr_link=true (the shared hyperlink toggle).
    • Catches the under-report case. The page-wide indicator can read "All Systems Operational" while an incident is still in monitoring (its components have already recovered). Because we poll summary.json, the worst-of (page indicator, any active incident's impact) drives the badge, so a still-tracked major/critical incident is not missed.
    • Fail-silent by design. The background fetch writes the cache only for a well-formed body, so a network blip, a blocked host, or the status page itself being down never flashes a false "down": the last-good value (or silence) stands. A staleness ceiling (6x the poll interval, ~30 min) drops a phantom outage after a long sleep. It's an early warning, not ground truth: a status page is reactive and can lag a live incident.
    • Hardened source (S2). The endpoint is a fixed constant, not a config key, so a sourced statusline.conf cannot repoint the fetch; only an env var (STATUSLINE_CLAUDE_STATUS_URL, used by the tests) can. No auth header is ever sent to the public endpoint.

Docs

  • README "How it compares" gains an upstream-status-early-warning row (no surveyed statusline ships one); the Segments table, Configuration notes, and Uninstall list document the new segment. The web configurator (docs/index.html) gains an "Claude status" control group (enable + tier floor + poll interval) and a sample-state selector so the live preview can show the degraded badge.

Internal

  • New tests/claude_status.bats (16 tests: display policy, tier floor, glyph/colour, staleness ceiling, fail-silent guard, OSC 8 link, and the summary.json parser + under-report escalation via a file:// fixture). show_claude_status/claude_status_min/claude_status_cache_seconds added to --dump-config and statusline.conf.example; .statusline-claude-status-cache added to --uninstall. Suite 187.
⌂ 换网址