Repository navigation
Description
Problem
Between 2026-09-08 and 2026-09-22, roughly two dozen merged PRs built out cost accounting,
per-tier pricing, the persistent cost ledger and the abctl spend surface. Almost none of
them is linked to an issue. Of 26 cost-related PRs in that window, only two reference a
closing issue (#1042 → #1000, #928 → #910).
This is a tracking gap, not a code gap — the work shipped and works. But it means:
- The single largest stream of work in the v0.9.0 window is invisible from epic: Cortex v0.9.0 — stable local tool for coding agents #962, and therefore
invisible from epic: Cortex Local — cost reduction, observability, and stability rossoctl#2514 and from project management above it. - There is no issue to hang the remaining work off, so "is the cost surface done?" has no
answer anyone can look up. - Regressions have nowhere natural to be filed against.
This issue exists to give that stream one trackable home and to record what remains.
What landed (reference)
Costing core and pricing
- feat: ✨ Cost emission on event stream #907 cost emission on the event stream
- Feat: Report per-request cost and coverage on /v1/usage #920 per-request cost and coverage on
/v1/usage - Feat: Consolidate model pricing into authlib/pricing (closes #910) #928 consolidate model pricing into
authlib/pricing(closes feature: consistent model cost across the board #910) - Feat: Gateway discount as a multiplier, plus pricing inspection and drift detection #968 gateway discount as a multiplier, plus pricing inspection and drift detection
- Refactor: One owner for cost, and plugins that only act on it #973 one owner for cost, plugins only act on it — implements Aggregate cost computation into one owner #972, see below
- fix: Make every COST cell answer for its own row, and publish the output half #980 every COST cell answers for its own row; publish the output half
- feat: settle each response's cost once, refusing what it cannot bear #1012 settle each response's cost once, refusing what it cannot bear
- Fix: Stop charging a gateway cost figure that omits cache tokens #1072 stop charging a gateway cost figure that omits cache tokens
Per-tier cost split
- feat(pricing): capture the modelled per-tier cost split #1064 capture the modelled per-tier cost split
- feat(usage): aggregate and apportion the per-tier cost split #1065 aggregate and apportion the per-tier split
- feat(abctl): show where the money went, by rate tier #1066 show where the money went, by rate tier
- fix(costledger): persist the per-tier cost split, and recover it for rows already on disk #1097 persist the per-tier split and recover it for rows already on disk
Ledger and persistence
- feat: Aggregate tokens and cost per minute, and say what each total cannot claim #1013 aggregate tokens and cost per minute, and say what each total cannot claim
- feat: Persist per-minute cost so "what did today cost" survives a restart #1014 persist per-minute cost so "what did today cost" survives a restart
- feat: Serve today and 7d from the ledger, and wire it where it can survive #1015 serve today and 7d from the ledger, and wire it where it can survive
- Perf: Make the session store cost less and read fully #1040 make the session store cost less and read fully
abctl spend surface
- feat(cost): aggregate avoided cost beside spend, never in it #1050 aggregate avoided cost beside spend, never in it
- feat(abctl): abctl cost, and a client that can ask for a symbolic window #1051
abctl cost, and a client that can ask for a symbolic window - feat(abctl): always-on spend strip under the title #1053 always-on spend strip under the title
- feat(abctl): expand the spend strip into a breakdown, and per-session cost #1054 expand the spend strip into a breakdown, and per-session cost
- Fix: Scope every spend figure to the span it covers #1067 scope every spend figure to the span it covers
- Feat: Show the four budget spans in the abctl spend band #1073 show the four budget spans in the spend band
- Fix: One rule for how precise a money figure is in abctl #1077 one rule for how precise a money figure is
- Fix: Read the sessions table and $ drawer in cents, and mark SAVED once #1081 read the sessions table and
$drawer in cents, mark SAVED once - feat(abctl): fold the spend band to one line, tabulate the cost breakdown #1098 fold the spend band to one line, tabulate the cost breakdown
- style: 🎨 Right-align numeric event cols and round usage to cents #1042 right-align numeric event cols, round usage to cents (closes Feedback: visual notes on event picker and usage screens #1000)
Related issues
- Aggregate cost computation into one owner #972 — "Aggregate cost computation into one owner" is still open but appears done.
Refactor: One owner for cost, and plugins that only act on it #973's body opens with "Implements Aggregate cost computation into one owner #972", but the PR never used a closing keyword, so the
issue stayed open and has not been touched since 2026-09-11. Someone who owns this should
confirm the three-layer design landed as specified and close it — or say what is left. - Aggregate cost renders $0.00 for positive sub-micro spend #1046 — aggregate cost renders
$0.00for positive sub-micro spend (open bug on this surface) - security: a gateway's cost header is trusted after a plausibility check, not authenticated #1027 — a gateway's cost header is trusted after a plausibility check, not authenticated
(open security concern on this surface)
What remains
- Confirm Aggregate cost computation into one owner #972 is satisfied by Refactor: One owner for cost, and plugins that only act on it #973 and close it, or record the remainder
- Decide whether the cost surface is feature-complete for v0.9.0, or name what is missing
- Aggregate cost renders $0.00 for positive sub-micro spend #1046 and security: a gateway's cost header is trusted after a plausibility check, not authenticated #1027 are the known open defects on this surface — triage both against the
v0.9.0 exit bar - Exit-bar item 3 ("the numbers are right and they persist") is largely this work —
confirm it is verifiable, and by what test
Why this is filed retroactively
Per rossoctl/rossoctl#2514, GitHub sub-issues can only link issues, not PRs, so a PR-only
stream cannot be attached to an epic. Recording it as one issue makes it linkable. Going
forward, cost work should get an issue first.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
huang195 commentedon Oct 5, 2026
Closing: every item under What remains now has an answer, and what's left is tracked in its own issue.
formatUSDTotalMicrosnow floors positive sub-cent spend instead of showing$0.00; see the closing note there for the one narrow case left.MaxCostMicros, is closed:headerCostnow refuses any gateway figure over $10,000 on every path (core/cost/pricing/cost.go). What remains is authenticity. That is a trust-model decision (allowlist vs strip-by-default), and it matters least on a laptop, where the user picks the upstream and budget enforcement is opt-in.TestWindow_ARestartInTheSameMinuteHidesNothingAlreadyCommittedandTestWindow_CountsAMinuteExactlyOnceAcrossTheFlush, plus crash-fragment and DST coverage incore/cost/ledger. No test yet drives a real request end to end and reads the numbers back after a restart. That is the parsed-event bullet on test: release smoke test on macOS CI runners #956, blocked on feature: support unattended agent workloads — headless agent runs with no human present #955.Landed since this was filed:
thinking_tokensand reasoning spend.cost --agent; Feat: Add abctl cost --by, with a dash for unpriced rows #1152cost --by; Feat: Fold an agent's versions into one row wherever figures are keyed by agent #1202 one row per agent across its versions; Feat: Break one agent's last hour down by model #1222 one agent's last hour by model.Flushwaits for late rows.