ax cost models|sessions|split [--days=N] [--json]
- --days=N
- window (default 14)
- --model=<name>
- filter cost sessions to one model
- --limit=N
- cap rows for cost sessions (default 20)
$ ax cost models --days=14
model sessions prompt completion cost
claude-opus-4 18 412,330 88,120 $42.17
claude-sonnet-4 54 980,114 201,447 $19.05
total: $61.22 (14 days)
Flags & sub-commands
- ax cost models: per-model rollup of sessions, prompt/completion/cache tokens, and estimated cost USD.
- ax cost sessions: the most expensive sessions with id, project, model, started_at; --model and --limit narrow it.
- ax cost split: origin (main vs subagent) × model matrix with cost and share-of-total, plus a totals row.
ax dispatches [--days=N] [--limit=N] [--candidates]
- --candidates
- inherit + expensive + routing-class match, with est. savings
- --days=N
- window (default 14)
- --limit=N
- rows in the table (default 30)
$ ax dispatches --candidates --days=14
ts agent_type description suggest child_cost est_savings
2026-06-11T14:22:08 general run the test suite sonnet $1.84 $1.55
2026-06-10T09:51:30 general lint and format sonnet $0.92 $0.78
total est savings: $2.33
top classes: run-tests ($1.55), lint-format ($0.78)
Flags & sub-commands
- ax dispatches: the default table shows ts, agent_type, description, dispatch_model ("inherit" when unset), child_model, child_cost_usd, plus a summary (count, % inherit, total subagent cost).
- ax dispatches --candidates filters to inherit + expensive (fable/opus) dispatches that match a routing class, suggesting a cheaper model and estimated savings per dispatch.
- ax dispatches compile-routing is an alias of `ax routing compile` (writes ~/.ax/hooks/routing-table.json from the built-in defaults, preserving origin:user classes).
ax routing tune|compile|show [--days=N] [--out=PATH]
- --dry-run
- (tune) print proposals only
- --emit-brief
- (tune) write an agent-backtest brief for judgment cases
- --apply=id,id
- (tune) apply specific proposal ids post-brief
$ ax routing tune --dry-run --days=30
id pattern suggest count addressable judgment
run-tests run * tests sonnet 11 $14.20 no
lint-format lint and * sonnet 6 $5.40 no
2 proposals addressable spend: $19.60 (30 days)
Flags & sub-commands
- ax routing tune mines unmatched expensive inherit dispatches (two-token prefix clustering, ≥3 members) and auto-applies non-judgment proposals to the routing table as origin:user.
- Judgment-flagged classes (review/design/plan/audit/...) are never auto-applied; ship them via --emit-brief → agent backtest → --apply=ids.
- ax routing compile is a merge-preserving regenerate (defaults refresh, origin:user classes survive; refuses to overwrite a corrupt file).
- ax routing show prints the effective table with class origins.
ax quota [--json|--statusline|--swiftbar] [--max-age=N] [--fresh]
- --statusline
- one plain line for the Claude Code statusLine command
- --swiftbar
- SwiftBar/xbar menubar plugin body
- --max-age=N
- cache TTL seconds (default 60); --fresh forces a refetch
$ ax quota
window used resets in source
5h 41% 2h 18m live
7d 63% 3d 04h live
Flags & sub-commands
- Reads the Claude Code OAuth token (macOS Keychain "Claude Code-credentials", fallback ~/.claude/.credentials.json); never refreshes it.
- Responses are cached at ~/.ax/quota-cache.json so statusline/menubar callers can poll freely; fetch failures degrade to the stale cache.
- --json, --statusline, and --swiftbar are mutually exclusive. Render-only modes never fail loud - they print a quiet "quota n/a" and exit 0.
ax thinking [--days=N] [--json]
- --days=N
- window (default 14)
- --json
- machine output
$ ax thinking --days=14
model sessions think_turns think% think_tokens
claude-opus-4 18 94 41.2% 612,400
claude-sonnet-4 54 120 18.7% 201,330
Flags & sub-commands
- Thinking volume (blocks/tokens) is counted from thinking content blocks at ingest; rows ingested before the fields existed read zero until a re-ingest backfills them.
- Reasoning-effort distribution spans sources: Codex turn_context effort and Claude settings.json effortLevel stamped on sessions active at ingest time.
ax digest [--json] [--refresh]
- --refresh
- recompute the snapshot now instead of waiting for the watcher
- --json
- print the raw snapshot JSON
$ ax digest
[ax] your board (14d window):
- repair-loop (927 LOC churned, 1 failed check: test)
-> ax sessions churn --here
- routing could save ~$292/wk (61% inherit)
-> ax dispatches --candidates
- 6 improve proposals pending
-> ax improve recommend
Flags & sub-commands
- A derive-tagged ingest stage writes ~/.ax/digest.json every ingest; the surface-digest hook reads it, dedups against ~/.ax/digest-shown.json (6h window, count cap, resolved-drop), and injects the top 3 at session start.
- Sources: open improve proposals, routing savings, repair-loop churn, and quota burn (surfaced only above 70%). Compute and surface are split by the snapshot file, so a DB hiccup never blocks session boot.
ax usage
Your ax utilization: total runs, active days, top commands, agent-vs-tty split, and the surface you have never touched.
ax usage [--json] [--days=N]
- --days=N
- window in days (default 30)
- --json
- machine output: full UsageRollup JSON
$ ax usage
[ax] usage (30d): 147 runs across 18 active days (agent 89 / tty 58)
top commands:
ingest 42
sessions 31
improve 19
cost 14
quota 9
dispatches 8
thinking 7
recall 5
3 never used: tui, share, dojo
Flags & sub-commands
- Usage records are written at every invocation (including failures) to ~/.ax/usage.jsonl and imported into ax_invocation at ingest time. Run ax ingest first to see populated results.
- The never-used list shows visible top-level commands with zero invocations in the window - a quick way to spot surface you have not explored.