Skip to content

[G3] Accounting fixes unlocked by shared evidence: Codex per-request turns (#504), subagent project rollups and harness split (#506), sessions list token column #563

Description

@willwashburn

Part of #553 (group 3 — depends on burn #562 cutover; relayhistory #172 usage records, #175 project identity, #170 relationships; parallel with #560).

Problem

Two open accounting defects are cheaper to fix on top of relayhistory's evidence than in burn's readers, and the reader fix path closes at cutover:

Scope

  1. Codex requests: inferences rows built from SessionEvidence.requests (one per request; request_id_source = "codex_token_count"), turns still one per task_started/task_complete; burn compare/summary --quality per-turn metrics gain --per request|turn (default request for Codex, documented in README.md); close Codex turn accounting collapses many API requests into one turn #504 and either land the request-level parts of PR Fix Codex request-level turn accounting (#504) #512 or close it superseded.
  2. Project rollups: summary, hotspots, findings gain --group-by project keyed by project_key; delegated children attribute to the parent's project_key (relayhistory method = Inherited) and --by-relationship still shows them separately; --bucket output gains a harness dimension (SourceKind).
  3. sessions list: add tokens (total) and cost columns from the ledger (no relayhistory call; keep the verb offline).
  4. Tests on the corpus: nested-subagent rolls up to the parent project; Codex multi-turn yields N inferences for M token_count events; golden CLI snapshots updated with a documented diff.
  5. Close Codex turn accounting collapses many API requests into one turn #504 and Attribution and grouping gaps: subagent spend, project rollups, harness split, session token column #506 with links; update CHANGELOG.md.

Acceptance

  • burn summary --session <codex fixture> --json reports turns and requests separately and cost_per_request uses the request count.
  • burn summary --group-by project on nested-subagent shows one project row whose tokens equal parent + children.
  • burn sessions list shows a tokens column; --json includes total_tokens.

Out of scope

New harness support (#560).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions