every-sessions-usage-is-observed — What every AI session consumed is observed from the provider, attributed to the work it served, and never estimated into a fact
Token consumption, model and cost of every session of a declared provider (docs/generated/providers.md) on this repository are recorded automatically from what the provider itself reports, and recorded as not observed, with the reason, where the provider reports nothing Majordomus can receive; they are attributed to session, task, issue and intent, shown in /ui with a click-through to the reported event, and used to judge what Majordomus costs and saves, with no estimate shown as a measurement.
PLANNED 0 of 13 issues done
- ready
- 3
- blocked
- 10
- active
- 0
- verify
- 0
- done
- 0
- cancelled
- 0
Problem
Token consumption, model and cost of every session of a declared provider (docs/generated/providers.md) on this repository are recorded automatically from what the provider itself reports, and recorded as not observed, with the reason, where the provider reports nothing Majordomus can receive; they are attributed to session, task, issue and intent, shown in /ui with a click-through to the reported event, and used to judge what Majordomus costs and saves, with no estimate shown as a measurement. Proposed in ADR 0213 (Usage is observed through each provider's official telemetry into one provider-neutral record, and reported, estimated and billed amounts are never merged) (proposed; it carries no authority until the owner accepts it). Sources: chatgpt-majordomus:c234#0, chatgpt-majordomus:c236#0, chatgpt-majordomus:c236#5, chatgpt-majordomus:c253#0, chatgpt-majordomus:c253#5, chatgpt-majordomus:c278#6.
Outcome
Token consumption, model and cost of every session of a declared provider (docs/generated/providers.md) on this repository are recorded automatically from what the provider itself reports, and recorded as not observed, with the reason, where the provider reports nothing Majordomus can receive; they are attributed to session, task, issue and intent, shown in /ui with a click-through to the reported event, and used to judge what Majordomus costs and saves, with no estimate shown as a measurement.
Current state
Its issues extend existing milestones; see each issue's why.
Desired state
Every criterion of the intent is carried by an issue here and proven by its test.
Acceptance criteria
- A Claude Code session with collection enabled leaves usage records with model and input, output, cache-read and cache-write tokens as reported
- A provider that reports nothing, and an event missing a token category, yield an explicit absence with a reason, never a zero
- Codex cumulative totals replayed from fixtures produce the same session total as the increments, and Codex usage no evidenced seam hands Majordomus reads not observed with its reason, never zero
- Gemini CLI usage events captured from a named, dated client version map onto the same usage record, thought tokens included
- /ui shows usage by provider, model, session, task and issue, and every figure links to its reported events and names its measurement class
- Each compaction's context before and after is recorded from a captured provider event of a dated client version, or recorded absent where the provider reports no counts; no transcript is parsed
- A task over its declared token budget is told so, naming the budget, the figure and its class, and is refused only where policy declares refuse
- majordomus economics check refuses a waste finding's counterfactual effect, or a subscription session's price-list estimate, presented as a saving or as spend, on generated and UI surfaces as well as in hand-written prose
- majordomus economics summary lists every declared treatment arm (per mechanism and per agent topology) and every hypothesis, each untested until its pairs meet ADR 0082's publication rule
- Majordomus's own per-operation overhead in an adopting fixture repository (CLI start, warm discovery, idle server CPU and memory, incremental derive, bootstrap tokens) is measured against declared budgets, and bench --check fails when one is exceeded
Validation
- majordomus plan validate
Issues
Each one is an execution contract with its own acceptance criteria, validation command and required evidence. The wave column is the layer of the dependency graph it sits in.
| issue | status | wave | depends on | title |
|---|---|---|---|---|
| I3287 | READY | 0 | — | A provider declares how it reports usage, with the evidence, beside its lifecycle |
| I3288 | BLOCKED | 1 | I0301, I3287 | The shared server receives Claude Code's OpenTelemetry usage events over loopback and records them as reported |
| I3289 | BLOCKED | 2 | I3288 | Turning usage collection on is a dry-run plan the person consents to, never a committed repository setting |
| I3290 | BLOCKED | 3 | I0301, I3287, I3289 | Codex usage is read from app-server increments, and a cumulative total is never summed |
| I3291 | BLOCKED | 2 | I3288 | Gemini CLI usage events map onto the same record, thought tokens included |
| I3292 | BLOCKED | 1 | I0301, I3287 | Reported tokens, a price-list estimate and a billed amount are three fields, and the billing mode says which account paid |
| I3293 | BLOCKED | 2 | I3288 | Usage is attributed to the session, task and issue it was spent on, from records the repository already keeps |
| I3294 | BLOCKED | 4 | I3293, I3292, I0304 | /ui shows usage by provider, model, session, task and issue, and every figure opens its reported events |
| I3295 | BLOCKED | 3 | I3292, I3293, I0402 | A task declared over its token budget is told so, and refused only where policy says refuse |
| I3296 | BLOCKED | 2 | I3288 | Each compaction is measured: the context before and after, from the provider's report |
| I3297 | BLOCKED | 3 | I3293, I0501 | A waste finding names its evidence and confidence and is never presented as a saving |
| I3298 | READY | 0 | — | The benchmark declares one arm per mechanism and per agent topology, and a short-task hypothesis beside the long-work one |
| I3299 | READY | 0 | — | Majordomus's own overhead in an adopting repository is measured per operation against declared budgets |
The graph
flowchart LR
I3287["I3287<br/>A provider declares how it reports usage, with the evidence, beside its lifecycle"]:::ready
I3288["I3288<br/>The shared server receives Claude Code's OpenTelemetry usage events over loopback and records them as reported"]:::blocked
I3289["I3289<br/>Turning usage collection on is a dry-run plan the person consents to, never a committed repository setting"]:::blocked
I3290["I3290<br/>Codex usage is read from app-server increments, and a cumulative total is never summed"]:::blocked
I3291["I3291<br/>Gemini CLI usage events map onto the same record, thought tokens included"]:::blocked
I3292["I3292<br/>Reported tokens, a price-list estimate and a billed amount are three fields, and the billing mode says which account paid"]:::blocked
I3293["I3293<br/>Usage is attributed to the session, task and issue it was spent on, from records the repository already keeps"]:::blocked
I3294["I3294<br/>/ui shows usage by provider, model, session, task and issue, and every figure opens its reported events"]:::blocked
I3295["I3295<br/>A task declared over its token budget is told so, and refused only where policy says refuse"]:::blocked
I3296["I3296<br/>Each compaction is measured: the context before and after, from the provider's report"]:::blocked
I3297["I3297<br/>A waste finding names its evidence and confidence and is never presented as a saving"]:::blocked
I3298["I3298<br/>The benchmark declares one arm per mechanism and per agent topology, and a short-task hypothesis beside the long-work one"]:::ready
I3299["I3299<br/>Majordomus's own overhead in an adopting repository is measured per operation against declared budgets"]:::ready
I3287 --> I3288
I3287 --> I3290
I3287 --> I3292
I3288 --> I3289
I3288 --> I3291
I3288 --> I3293
I3288 --> I3296
I3289 --> I3290
I3292 --> I3294
I3292 --> I3295
I3293 --> I3294
I3293 --> I3295
I3293 --> I3297
classDef done stroke:#16a34a,fill:#dcfce7,color:#14532d,stroke-width:2px
classDef active stroke:#2563eb,fill:#eff6ff,color:#1e3a8a,stroke-width:2px
classDef verify stroke:#7c3aed,fill:#f5f3ff,color:#4c1d95,stroke-width:2px
classDef ready stroke:#0891b2,fill:#ecfeff,color:#164e63,stroke-width:2px
classDef planned stroke:#0891b2,fill:#ecfeff,color:#164e63,stroke-width:2px
classDef blocked stroke:#b45309,fill:#fffbeb,color:#78350f,stroke-width:2px
classDef cancelled stroke:#6b7280,fill:#f9fafb,color:#374151,stroke-width:2px
classDef superseded stroke:#6b7280,fill:#f9fafb,color:#374151,stroke-width:2pxLinked from this diagram (13)
- I3287 A provider declares how it reports usage, with the evidence, beside its lifecycle
- I3288 The shared server receives Claude Code's OpenTelemetry usage events over loopback and records them as reported
- I3289 Turning usage collection on is a dry-run plan the person consents to, never a committed repository setting
- I3290 Codex usage is read from app-server increments, and a cumulative total is never summed
- I3291 Gemini CLI usage events map onto the same record, thought tokens included
- I3292 Reported tokens, a price-list estimate and a billed amount are three fields, and the billing mode says which account paid
- I3293 Usage is attributed to the session, task and issue it was spent on, from records the repository already keeps
- I3294 /ui shows usage by provider, model, session, task and issue, and every figure opens its reported events
- I3295 A task declared over its token budget is told so, and refused only where policy says refuse
- I3296 Each compaction is measured: the context before and after, from the provider's report
- I3297 A waste finding names its evidence and confidence and is never presented as a saving
- I3298 The benchmark declares one arm per mechanism and per agent topology, and a short-task hypothesis beside the long-work one
- I3299 Majordomus's own overhead in an adopting repository is measured per operation against declared budgets
Canonical record: .ai/repo/project/milestones/every-sessions-usage-is-observed.yaml. Read it back with majordomus plan show every-sessions-usage-is-observed.