Skip to content

v0.7.7: make spend/cost display monotonic and source-backed #244

Description

@Hmbown

Problem

In live use, the displayed spend/cost appeared to go down during or after sub-agent/fanout activity. Even if token accounting is approximate, the user-visible total should not decrease unless there is an explicit reset or session switch.

This may be related to overlapping parent/sub-agent usage accounting, prompt-cache adjustments, or replacing provisional estimates with lower final values, but the UI needs to make the source of truth clear.

Acceptance

  • Session spend display is monotonic within a session unless a clearly labelled reset/session change occurs.
  • Parent and sub-agent usage events are deduplicated without subtracting already-displayed totals in a confusing way.
  • If provisional estimates are replaced by final provider usage, the UI communicates that or tracks separate estimated/final fields.
  • Cache-hit/cached-token accounting does not make the visible total appear to move backwards.
  • Add focused tests for out-of-order usage events, duplicate sub-agent events, and final-usage reconciliation.

Notes

Related to the broader telemetry/audit work in #204, but this issue tracks the concrete user-visible regression: spend should not visibly decrease during a live run.

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

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions