Claude Code Statusline

Rich status line for Claude Code showing context usage, rate limits, and costs at a glance.
Features
- Context Window - Progress bar with percentage and token count (color-coded: green → yellow → red)
- 5h Rate Limit - Usage + pace indicator + smart time display
- 7d Rate Limit - Usage + pace (work-day aware) + time display
- Pace Indicator - Shows if you're on track (
1.0x) or burning fast (2.0x)
- Agent Count - Shows number of active Claude processes when running with subagents
- Ollama Savings Tracker - Tracks local model usage and shows estimated Haiku-equivalent cost savings
- Stale Context Detection - Ignores stale API percentages after clear/compact
- Native Rate Limits - Uses Claude Code's built-in
rate_limits data (≥2.1.80), no API polling needed
- Limit ETA - Shows
⚠️ ~14:30 when you'll hit the 5h limit at current pace
- No Background Process - Global burn rate calculated from stdin deltas, zero overhead
- Cross-Tab Sync - All sessions share rate limit data via cache
- API-Key Mode - Session + daily cost tracking with burn rate
Quick Start
Requires: jq (brew install jq / apt install jq)
# Add marketplace & install
claude plugin marketplace add Benniphx/claude-statusline
claude plugin install statusline
# Restart Claude Code
What You'll See
Subscription Mode
Opus 4.6 (3) │ Ctx: ██░░░░░░ 30% (60K/200K) │ 5h: ███░░░░░ 46% 0.5x →47m │ 🔥 5.0K t/m │ 7d: ██░░░░░░ 27% 0.6x │ 12m │ +142/-38 │ 🦙 saved ~$1.71 (387 req · 3.3M tok)
| Section | Description |
|---|
Opus 4.6 | Model name, color-coded by context usage (green <50%, yellow 50-80%, red >80%) |
(3) | Active Claude processes — only shown when >1 (teams/subagents) |
Ctx: ██░░░░░░ 30% (60K/200K) | Context window: progress bar + percentage + tokens used/total |
5h: ███░░░░░ 46% 0.5x →47m | 5-hour rate limit: usage, pace (0.5x = half speed), time until reset |
🔥 5.0K t/m | Burn rate: tokens per minute (current consumption speed) |
7d: ██░░░░░░ 27% 0.6x | 7-day rate limit: weekly usage + pace |
12m | Session duration in minutes |
+142/-38 | Lines added (green) / removed (red) in this session |
🦙 saved ~$1.71 (387 req · 3.3M tok) | Ollama savings: estimated Haiku-equivalent cost saved by running locally |
Pace details:
| Example | Meaning |
|---|
5h: ████░░░░ 40% 0.8x | Under budget (sustainable) |
5h: ██████░░ 72% 1.3x | 30% over sustainable pace |
5h: ████████ 95% 2.1x ⚠️ ~14:30 | Will hit limit at ~14:30 at current pace |
5h: ██████░░ 85% 1.3x →45m | Reset in 45min (shown when ≤1h) |
5h: ███████░ 90% 1.5x →12m @14:30 | Reset at 14:30 (shown when ≤30m) |
API-Key Mode
Opus 4.6 │ Ctx: ████░░░░ 45% (90K/200K) │ 💰 $0.42 │ 📅 $3.85 │ 🔥 8.2K t/m $1.20/h │ 12m │ +142/-38
| Section | Description |
|---|
💰 $0.42 | Session cost (green <$0.50, yellow <$2.00, red >$2.00) |
📅 $3.85 | Daily cost across all sessions today (green <$5, yellow <$20, red >$20) |
🔥 8.2K t/m $1.20/h | Burn rate: tokens/min + cost per hour (green <$1/h, yellow <$5/h, red >$5/h) |
Local Models
Ollama/local models display with the llama icon and detected context size:
🦙 Qwen3 │ Ctx: █░░░░░░░ 15% (3K/32K) │ ...
Understanding Pace
The pace indicator (1.3x) shows how fast you're consuming your limit compared to a sustainable rate.
| Pace | Color | Meaning |
|---|
0.5x | 🟢 Green | Half the sustainable rate - very conservative |
1.0x | 🟢 Green | Exactly sustainable - will use 100% by reset |
1.3x | 🟡 Yellow | 30% faster than sustainable |
2.0x | 🔴 Red | Double speed - will hit limit at 50% time |
5h Pace: Based on usage% / hours_elapsed. Sustainable = 20%/hour.
7d Pace: Based on work days (Mon-Fri by default). If you've used 40% after 2 work days, and have 3 work days left, that's (40%/2) / (100%/5) = 1.0x.
Configuration
Create ~/.config/claude-statusline/config:
mkdir -p ~/.config/claude-statusline
cat > ~/.config/claude-statusline/config << 'EOF'
# ─────────────────────────────────────────────────────────
# Context Warning Threshold
# ─────────────────────────────────────────────────────────
# Show ⚠️ when context usage exceeds this percentage
# Useful to get a heads-up before hitting context limits
# Range: 1-100, Default: disabled
CONTEXT_WARNING_THRESHOLD=75