Show my usage and my leaks
Tokens by session, worker and model, the bytes crush kept off the wire, and the habits that waste them.
Prompt#
Show me what this workspace is spending, and where I'm leaking context.
What the Chair does#
Reads the local ledger — no provider call — and prints spend by seat, then the leak telemetry that names the wasteful habit.
MCP calls#
usage_status({ "recent": 10 })
usage_status({ "view": "leaks" })
usage_status({ "view": "governance" })
CLI, for the human-readable version:
orch usage # table: by session, by worker, by model
orch usage --format json --limit 10
orch usage --leaks # rereads, repeated calls, oversized results, silent streaks
orch usage --leaks --format json
orch usage --governance # conflict_rate / duplicate_rate per session
orch gateway status # live/cooldown, ring position, rotations per provider
Expected response#
usage_status takes an optional view: summary (default), leaks or
governance; an unknown value errors with view must be summary|leaks|governance.
view: summary(or omitted) returnssummary,saved_pct,total_bytes_saved,by_session[],by_worker[],by_model[],agents[],counters[]. Every breakdown row is{key, attempts, prompt_tokens, completion_tokens, bytes_saved}. Agraphblock carries whatcode_snippetandtrace_pathreturned against the size of the files they stood in for.view: leaksreturns the same content-free rows asorch usage --leaks, keyed by session (reread_files,repeated_calls,large_results,silent_streaks).view: governancereturns{sessions[], pairs[]}— the same conflict/duplicate metrics asorch usage --governance, plus pairwise conflicts.
Gotchas#
- It is content-free, so you can paste it to a human. The gateway ledger stores
counts, never prompts.
orch gateway statusis content-free too: no keys, no bodies. - Leaks and governance are also over MCP.
usage_status({ "view": "leaks" })andusage_status({ "view": "governance" })return the same rows as the CLI flags — no shell needed. cache_hitsis spend avoided, not spend. A request the gateway answered from its exact-match cache carriesX-Orchemax-Cache: hitand is not counted as an upstream attempt. Read saved and spent as two columns, never as one net number.- The cache is off by default.
gateway.cache.ttl_secis0unless you set it, and streaming is never cached — socache_hits: 0usually means "not enabled", not "never hit". - Only traffic through the gateway is counted. A preset on
agents.auth.<preset>: account— Claude Code on its own plan login,codexandcursorby default — routes no model traffic here, so it shows attempts but not provider tokens. recent(MCP) and--limit(CLI) are the same idea: attach the N most recent attempts. Leave it out for the aggregate only.- What the leak columns mean: rereading a file you already read, calling the same tool with the same arguments, returning results too big to be useful, and long silent streaks. Each one has a cheaper move in Stop reading whole files.