statusline
Wire codeArbiter’s statusline into ~/.claude/settings.json, or remove it.
What it does
Section titled “What it does”Wires codeArbiter’s renderer into ~/.claude/settings.json, or removes it. A plugin can’t own a
statusLine directly and ${CLAUDE_PLUGIN_ROOT} isn’t expanded inside settings.json, so this
command resolves the renderer’s absolute path and writes it in. It’s the only sanctioned way to
make that edit: the backing script backs up any existing statusLine before overwriting it
(so uninstall can restore it later), and it never clobbers a settings file it can’t parse.
The renderer itself is global — folder, git, model, rate limits, context, cumulative tokens, and an estimated API-equivalent cost render in every repo. The arbiter-specific segments (stage, tasks, open questions, overrides) show up only in a repo that has opted in via CONTEXT.md frontmatter. Token and cost figures are read from the session transcript’s real per-model usage — the cost is an estimated pay-as-you-go equivalent, not a bill.
/ca:statusline install | uninstall | statusinstall is the default. Before running install, the resolved command and the prior line it
will back up are shown for confirmation — editing global settings is the user’s call.
Example
Section titled “Example”> /ca:statusline install
About to set statusLine.command to: python "/home/x/.claude/plugins/ca/hooks/statusline.py"No prior statusLine to back up.Proceed? y
WIRED codeArbiter statusline -> python ".../hooks/statusline.py"no prior statusLine existed; uninstall will simply remove ours.
Takes effect on the next render (new prompt or session).When to reach for it
Section titled “When to reach for it”Confirming the wiring took effect, or diagnosing whether something else owns the statusline, is
/ca:doctor’s broader install-health check as well as this command’s own status action.
Related
Section titled “Related”Source
Section titled “Source”Source — plugins/ca/commands/statusline.md (v2.9.1)
---description: Wire codeArbiter's statusline into ~/.claude/settings.json, or remove it.argument-hint: install | uninstall | status---
# /ca:statusline — wire-up
A plugin cannot own a `statusLine`, and `${CLAUDE_PLUGIN_ROOT}` is not expanded inside`settings.json`. So the renderer at `${CLAUDE_PLUGIN_ROOT}/hooks/statusline.py` is wired in byresolving its absolute path at install time and writing it to the user's `statusLine.command`. Thebacking script `${CLAUDE_PLUGIN_ROOT}/hooks/wire-statusline.py` performs the surgery deterministicallyand never clobbers a settings file it cannot parse.
The renderer is global — its usage box (folder, git, model, rate limits, context, cumulative tokens,API-equivalent cost, per-call token burn) renders in every repo. The arbiter segments(`stage · tasks · q · over`) light up only where `.codearbiter/CONTEXT.md` sets `arbiter: enabled`.
Token and cost figures come from the session transcript: real per-model token usage is accumulated,and the cost is the estimated pay-as-you-go **API-equivalent** (labelled `api≈`) — what the sametokens would have cost at list API rates — not a bill.
Each visible subagent row reports its recorded model. Claude IDs retain a compact family/versionlabel such as `model:sonnet-4-6`; multiple models report `model:mixed`, while absent or malformedmetadata reports `model:?`. The tag uses the active theme's bright accent, with no model-specificcolors.
## Argument
`$ARGUMENTS` is one of `install` (default), `uninstall`, or `status`.
## Procedure
1. Run the backing script with the requested action, passing the resolved plugin root so the absolute path is written correctly:
``` python "${CLAUDE_PLUGIN_ROOT}/hooks/wire-statusline.py" <action> --plugin-root "${CLAUDE_PLUGIN_ROOT}" ```
On non-Windows hosts the interpreter token defaults to `python3`; override with `--interp` only if neither `python` nor `python3` is the wanted interpreter.
2. **install** — back up any existing `statusLine` to `_codearbiterStatuslineBackup`, then set `statusLine.command` to `<python> "<abs>/hooks/statusline.py"`. Re-running install after a plugin upgrade just refreshes the path; it does not overwrite the backup. **Before running install, show the user the resolved command and the prior line it will back up, and confirm.** Editing the user's global settings is their call, not yours.
3. **uninstall** — restore the backed-up line, or remove `statusLine` entirely if none existed.
4. **status** — report the current `statusLine.command`, whether it is codeArbiter's, and any backup on file. Changes nothing.
5. Report the script's output verbatim, then state what changed. If install succeeded, tell the user the statusline takes effect on the next render (a new prompt or session). Tip: `CODEARBITER_COMPACT=1` drops the subagent rows; `CODEARBITER_STATUSLINE=off` disables it; `CODEARBITER_WIDTH` sets the box width.
## Hard gate
MUST NOT edit `~/.claude/settings.json` by hand for this — the backing script is the only sanctionedpath, so the backup/restore contract holds. MUST NOT proceed with `install` without first surfacingthe resolved command to the user and getting a go-ahead.