Claude Epic Status Line
This post appeared first in my notes: Claude Epic Status Line.
Claude Epic Status Line is a feature-rich status line script for Claude Code. It replaces the default status bar with a color-coded display: one line of session info plus a rate-limit dashboard. Design principle: dim when healthy, colored when it needs attention. v2.0.0 (August 2026) was a complete redesign; v2.1.0 (September 2026) added the numbers a percentage cannot express. v2.2.0 (3 November 2026) follows Anthropic's latest changes: per-model cache-read rates and Ultra plans without a 5-hour limit. v2.2.1 (10 November 2026) adds the cache-read rate of Fable 5.2 and Mythos 5.2. v2.3.0 (11 November 2026) starts 5 processes per render instead of 113, supports Windows (Git Bash) and warns when the prompt cache has gone cold.

Features
- Model name: shortened, colored by model family (Opus/Sonnet/Haiku/Fable each get a hue)
- Context usage with token counts (
38% (76k/200k)); the percentage is the one Claude Code shows (context_window.used_percentage). One escalation scale everywhere: yellow ≥70%, orange ≥80% (steady bold⚠, the auto-compact cue), red ≥90%; separate⚠200k+alert - Per-turn cost (
48k/turn) and turn count (88t): what the next message costs before you type a character, on absolute token thresholds rather than a percentage. Since v2.2.0, the cache-read rate follows the model (CESL_TURN_RATE=auto): 5% of the input price for Opus 5.5 and Sonnet 5.5, 2.5% for Fable and Mythos 5.1 and 5.2 (Fable 5.1, Fable 5.2), 10% for the others (Fable 5 and Mythos 5 included). A 486k session on Opus 5.5 costs 24k a turn, not 48k. Before v2.2.1, Fable 5.2, Mythos 5.2 and Mythos 5.1 got the 10% rate, so their per-turn cost was four times too high - Cold prompt cache (since v2.3.0, Claude Code ≥ 2.1.251): the per-turn figure assumes a warm prompt cache, where the re-sent context is read at the cache-read rate. The cache lives 5 minutes or 1 hour, and each request renews it. Once that time has passed, the next message re-writes the whole context at the cache-write rate, which is above the input price. The line then shows
486k next turn (cache cold)plus a hint:prompt cache expired at 2:42pm — the next turn re-writes 486k at the cache-write rate, not ~24k — /clear first if you have switched task.CESL_SHOW_CACHE=0turns it off - Pace projection (
⇢ 94%) on the 5-hour and 7-day rows: where the window lands at the current burn rate - Context hint line naming the right command:
/compactfor a full window,/clearfor a merely expensive session. While the prompt cache is warm, it ends withcache warm until 2:42pm - Directory, shortened (
…/Notes/Vault), with the home directory as~ - Git status with staged (
S:2), unstaged (U:1), untracked (A:3) counts, ahead/behind arrows (⇡2⇣1), worktree marker (⎇wt). Agit statusstopped by its 2-second bound is marked with…instead of looking complete - Session cost (thresholded, currency-convertible), duration, lines changed (
+156/-23) - Effort level (
● high) plus badges: subagent name, fast mode, thinking, vim, non-default output style - Rate-limit dashboard:
█░bars with reset times for the 5-hour window, 7-day window, per-model weekly limits (parsed from an undocumented usage-APIlimits[]array; numbers Claude Code's own UI doesn't display), and extra-usage credits (only when enabled). A per-model row shows when its limit is active or has usage. The API marks the Fable weekly allowanceis_active: falsewhile it counts usage, so before v2.3.0 that row stayed hidden. Every row switches on its own Since v2.4.0,CESL_RATE_LAYOUT=inlineputs all the bars on one line, and the 5-hour and 7-day rows are filled in from the usage API when the stdin payload has none (for example before the first reply of a session); that fallback never starts a request on its own - Configuration system: zero-config by default;
~/.config/claude-epic-status-line/config.sh+CESL_*env overrides for thresholds, palette, model hues, bar width, glyph sets (unicode/nerd/ascii), per-segment and per-row toggles,NO_COLOR, cache TTL, currency explainsubcommand: dumps raw stdin JSON, parsed values, cache state, and effective config for debugging. Since v2.3.0, there's also aversionsubcommand
How it works
Claude Code pipes a JSON payload to the script on every refresh (model, context, cost, effort, rate limits; Claude Code ≥ 2.1.140). A render starts 5 processes: one jq call parses the whole payload, one git status --porcelain=v2 --branch call reads the repository, and bash builtins do the rest. Before v2.3.0, a render started 113.
Why does that matter? Claude Code debounces status line updates at 300 ms, and it cancels a render that is still running when the next update arrives. In Git Bash on Windows, a process costs about 60 ms, so a render took about 9 seconds. During an active session, renders kept being cancelled and the line stayed behind: it showed 354k of context and 244 requests for a session at 359k and 247. Measured on the same machines, a render now takes 0.8 s instead of 9 s on Windows (Git Bash), and 65 ms instead of 178 ms on Linux.
The usage API is contacted only for enrichment (extra credits, per-model limits), and never during a render. A render reads a cached digest. When the digest is older than the TTL (60 s by default), one background job refreshes it for the next render (stale-while-revalidate), with the OAuth token (env, credentials file, secret-tool, or macOS Keychain), per-user caching, and a single-flight lock across concurrent sessions. On a machine with no cache yet, the per-model and extra-usage rows appear on the second render. Turning off both API-backed rows skips token resolution and the request entirely.
Claude Code re-runs the status line only on events. To see the cache turn cold on an idle session, set refreshInterval (in seconds) in the statusLine block of ~/.claude/settings.json.
Hardened through a four-round adversarial review (Claude + GPT reviewers, 34 findings fixed: terminal-escape injection, token exposure on argv, overflow/octal arithmetic, cache races, macOS portability). Since v2.3.0, a test suite (bash tests/run.sh: 103 checks with fixtures, a fixed clock and a fake curl, no network) runs in CI on Linux, macOS (stock bash 3.2) and Windows (Git Bash).
The pace projection needs no state and no extra call: a rolling window opened at resets_at minus its own length, so the elapsed fraction (and therefore the burn rate) falls out of the stdin payload. It stays silent unless the pace actually overruns.
Ultra plans and the 5-hour limit
On 2026-10-30, Anthropic renamed Max 20x to Ultra and removed the 5-hour limit for verified Ultra accounts (Claude#Plans). Without a 5-hour window, there's no 5-hour row to draw: the dashboard shows the 7-day row and the per-model rows, and explain says why the 5-hour row is missing. v2.2.0 also fixes a bug this exposed: the script only trusted a usage-API response that had a five_hour section, so an Ultra account could lose its per-model and extra-usage rows along with it. Now a response needs at least one non-empty section, so error bodies still never reach the cache.
Why per-turn cost, not percentage
The API is stateless: every turn re-sends the whole conversation before you type a character. So the running cost is the context size, not the prompt length, and a one-word reply costs exactly what a complex request costs. A percentage cannot express this: 486k of a 1M window reads as a comfortable 49% full while re-sending 48k tokens every turn. The practical consequence is that /clear between unrelated tasks is the biggest available lever, and it is free: several short sessions move far less context than one long one, for identical work.
Requirements
jq,curl,git; bash 3.2+ (BSD or GNU userland)- Linux, macOS, Windows (Git Bash). Tested on Linux, Windows and bash 3.2; macOS is only covered by CI
- Claude Code ≥ 2.1.251 for the cold-cache warning
Status line or mod?
Since October 2026, mods can read much of the same data from inside Claude Code: $.session.usage() returns context window use, plan limits and cost, and the session.measure event fires after each turn and whenever a plan limit's percent used changes. A mod can then draw it in a pane or in the band above the prompt, with buttons. The status line script stays the lighter option: plain bash, no JavaScript, one line that Claude Code refreshes for you. "disableAllHooks": true turns off both.
References
- Documentation: https://dsebastien.github.io/claude-epic-status-line/
- Source code: https://github.com/dsebastien/claude-epic-status-line
- v2.4.0 release: https://github.com/dsebastien/claude-epic-status-line/releases/tag/v2.4.0
- v2.3.0 release: https://github.com/dsebastien/claude-epic-status-line/releases/tag/v2.3.0
- v2.2.1 release: https://github.com/dsebastien/claude-epic-status-line/releases/tag/v2.2.1
- v2.2.0 release: https://github.com/dsebastien/claude-epic-status-line/releases/tag/v2.2.0
- v2.1.0 release: https://github.com/dsebastien/claude-epic-status-line/releases/tag/v2.1.0
- Claude pricing (cache-read rates per model): https://claude.com/pricing
- Claude Code status line documentation (debounce and cancelled renders): https://code.claude.com/docs/en/statusline
- v2.0.0 release: https://github.com/dsebastien/claude-epic-status-line/releases/tag/v2.0.0
- Inspired by https://github.com/kamranahmedse/claude-statusline
- Per-turn cost and the actionable hint prompted by https://github.com/Field-Logic-Ltd/ClaudeStatsBar
Related
- Claude Code
- Claude
- CShip (alternative statusline; fewer built-in opinions, Starship-style TOML config and passthrough)
- Command Line Interface (CLI)
- Claude Code Extension Points
- Claude Code Prompt Caching
- Git Bash
- 2026-11-10 Claude Epic Status Line v2.2.1 - the right per-turn cost on Fable 5.2
- 2026-11-11 Claude Epic Status Line v2.3.0 - 5 processes instead of 113
About Sébastien
Ready to get to the next level?
Found this valuable? Share it with someone who needs it.