+349. **`/tokens`, `/stats`, and `/cost` return identical JSON payloads — three commands with distinct names produce the same output, and none includes context-window utilisation** — dogfooded 2026-04-30 by Jobdori on `a510f73`. Running each command in `--output-format json` mode: `/tokens` returns `{"kind":"stats","input_tokens":0,"output_tokens":0,...}` (kind says "stats"), `/stats` returns `{"kind":"stats",...}`, `/cost` returns `{"kind":"cost",...}`. All three share the same token-count fields and differ only in `"kind"`. None includes: `context_window` (model's max tokens), `context_used` (tokens in current context), `context_remaining` (available headroom), `context_utilisation_pct`, or `estimated_cost_usd`. An orchestration layer that needs to check "am I about to overflow the context window?" cannot use any of these three commands — it must independently know the model's context size and manually subtract cumulative token counts, which requires tracking across calls. **Required fix shape:** (a) give each command a meaningful, distinct payload: `/tokens` → context-window utilisation (`context_window`, `context_used`, `context_remaining`, `utilisation_pct`); `/stats` → cumulative turn/message counts and per-turn averages; `/cost` → monetary spend with `cost_usd` and rate breakdown; (b) if overlap is intentional, document the hierarchy in `/help --output-format json` so callers know which command to use for which purpose; (c) add regression coverage ensuring `/tokens`, `/stats`, and `/cost` return non-identical payloads and that `/tokens` includes a `context_window` field. Source: Jobdori live dogfood, mengmotaHost, `a510f73`, 2026-04-30.
0 commit comments