Add a custom status line to the Claude Code provider that shows session context at a glance. The status line is a bash script that reads JSON from stdin on every Claude Code render event and prints a formatted, colored line.
Segments (left to right — identity → config → health):
Directory — basename of working dir (bold blue)
Git branch — green on feature branches, red on main/master
Model — colored by cost tier: Haiku green, Sonnet amber, Opus red
Context % — model-aware thresholds: Opus 55/75%, Sonnet 65/85%, Haiku 75/90%; green → amber → red
Cost — session cost in USD; shown as ¢ below $1, $X.XX above; green → amber at $1.50 → red at $3.00
Tokens — cumulative session total, formatted as Xk when ≥ 1000; blue (informational only)
Vim mode — magenta, only shown when active
Segments joined with ·. Missing or zero-value segments are omitted entirely.
Files:
providers/claude-code/statusline-command.sh — the script
providers/claude-code/settings.json — updated with statusLine config
scripts/install.sh — updated to deploy the script and set executable bit
Acceptance criteria
providers/claude-code/statusline-command.sh exists and is executable
settings.json references the script via statusLine.command
install.sh deploys the script to ~/.claude/statusline-command.sh with chmod +x
All segments render correctly with ANSI colors (no literal \033[0m in output)
On a $20/month subscription, total_cost_usd measures session weight rather than real spend. Thresholds ($1.50 amber / $3.00 red) are calibrated to signal a heavy session, not budget overrun. Adjust upward if amber rarely appears.
Blocked by
0002 — install.sh
## What to build
Add a custom status line to the Claude Code provider that shows session context at a glance. The status line is a bash script that reads JSON from stdin on every Claude Code render event and prints a formatted, colored line.
Segments (left to right — identity → config → health):
- **Directory** — basename of working dir (bold blue)
- **Git branch** — green on feature branches, red on `main`/`master`
- **Model** — colored by cost tier: Haiku green, Sonnet amber, Opus red
- **Context %** — model-aware thresholds: Opus 55/75%, Sonnet 65/85%, Haiku 75/90%; green → amber → red
- **Cost** — session cost in USD; shown as ¢ below $1, $X.XX above; green → amber at $1.50 → red at $3.00
- **Tokens** — cumulative session total, formatted as Xk when ≥ 1000; blue (informational only)
- **Vim mode** — magenta, only shown when active
Segments joined with ` · `. Missing or zero-value segments are omitted entirely.
Files:
- `providers/claude-code/statusline-command.sh` — the script
- `providers/claude-code/settings.json` — updated with `statusLine` config
- `scripts/install.sh` — updated to deploy the script and set executable bit
## Acceptance criteria
- [x] `providers/claude-code/statusline-command.sh` exists and is executable
- [x] `settings.json` references the script via `statusLine.command`
- [x] `install.sh` deploys the script to `~/.claude/statusline-command.sh` with `chmod +x`
- [x] All segments render correctly with ANSI colors (no literal `\033[0m` in output)
- [x] Segments separated by ` · `, not `|`
- [x] Cost shown as ¢ below $1, $X.XX above
- [x] Tokens shown as Xk when ≥ 1000, raw number below
- [x] Missing fields produce no empty segment
- [x] `tests/test-statusline.sh` passes (11 tests)
- [x] `tests/test-install.sh` passes (now covers statusline deployment)
## Cost threshold rationale
On a $20/month subscription, `total_cost_usd` measures session weight rather than real spend. Thresholds ($1.50 amber / $3.00 red) are calibrated to signal a heavy session, not budget overrun. Adjust upward if amber rarely appears.
## Blocked by
- 0002 — install.sh
Claude
added this to the Legacy / Triage milestone 2026-06-28 17:09:32 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What to build
Add a custom status line to the Claude Code provider that shows session context at a glance. The status line is a bash script that reads JSON from stdin on every Claude Code render event and prints a formatted, colored line.
Segments (left to right — identity → config → health):
main/masterSegments joined with
·. Missing or zero-value segments are omitted entirely.Files:
providers/claude-code/statusline-command.sh— the scriptproviders/claude-code/settings.json— updated withstatusLineconfigscripts/install.sh— updated to deploy the script and set executable bitAcceptance criteria
providers/claude-code/statusline-command.shexists and is executablesettings.jsonreferences the script viastatusLine.commandinstall.shdeploys the script to~/.claude/statusline-command.shwithchmod +x\033[0min output)·, not|tests/test-statusline.shpasses (11 tests)tests/test-install.shpasses (now covers statusline deployment)Cost threshold rationale
On a $20/month subscription,
total_cost_usdmeasures session weight rather than real spend. Thresholds ($1.50 amber / $3.00 red) are calibrated to signal a heavy session, not budget overrun. Adjust upward if amber rarely appears.Blocked by