Skip to content

usage-reports-keep-what-agents-report - #938

Merged
VeryComplexAndLongName merged 2 commits into
mainfrom
usage-reports-keep-what-agents-report
Oct 24, 2026
Merged

VeryComplexAndLongName merged 2 commits into
mainfrom
usage-reports-keep-what-agents-report

Conversation

@VeryComplexAndLongName

@VeryComplexAndLongName VeryComplexAndLongName commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

A chain's stages share runId, so show cost previously retained only its first stage: 100 + 200 input tokens appeared as 100. Reports also dropped cache/thought fields, fabricated zero USD for token-only agents, omitted ACP model evidence, and refused archived changes.

This change preserves each invocation's recorded usage and keeps uncertainty visible:

  • Record invocationId and requestedModel in audit without changing the public chain runId; retain legacy terminal usage and repeated stages.
  • Aggregate cache/thought fields separately, omit unknown USD, retain true zero and signed vendor adjustments, and report USD coverage. Harness budgets consume the complete sums; token-cap semantics and currency units stay unchanged.
  • Read Codex ACP quota model metadata with explicit current-model attribution. Preserve the vendor's limitation rather than claiming an exact multi-model split.
  • Resolve active and archived cost reports in core, including retained entries at removed-worktree paths; refuse unknown or ambiguous identities.
  • Expose model acceptance in agent text/JSON and retain model/id evidence in show run. Change-history commands keep their existing purpose.

Usage-report messages and lookup refusals use the shared register without relaxing its ratchet. Tracked by the OpenSpec change and ADR 0053, with a patch changeset for core/CLI. CI workflows are unchanged.

Validation: 90 selected tests across 9 relevant files passed, including actual runner-to-budget accounting, ACP parsing, CLI reports, real HTTP/WebSocket contracts, and both UI transports. A real source-CLI smoke passed archived JSON/text cost, run audit, and agent capability commands. Core/CLI TypeScript checks passed; changed-source ESLint had no errors (one existing Harness import warning). Changed-file policy checks covered only the 31 authored files. Strict OpenSpec validation and Changesets status passed. Full suites are left to CI.

@VeryComplexAndLongName
VeryComplexAndLongName force-pushed the usage-reports-keep-what-agents-report branch from ebda013 to 48a7db5 Compare October 24, 2026 04:51
@VeryComplexAndLongName
VeryComplexAndLongName merged commit a9aef92 into main Oct 24, 2026
10 checks passed
@VeryComplexAndLongName
VeryComplexAndLongName deleted the usage-reports-keep-what-agents-report branch October 24, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant