Skip to content

fix: update v2 session usage metrics - #35468

Merged
rekram1-node merged 12 commits into
v2from
session-usage-metrics
Jul 7, 2026
Merged

fix: update v2 session usage metrics#35468
rekram1-node merged 12 commits into
v2from
session-usage-metrics

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • calculate V2 step costs from catalog pricing and context tiers
  • prefer Copilot provider-reported AIU billing when available, with token pricing as fallback
  • persist session token/cost totals after each completed step and refresh authoritative totals in the TUI
  • prevent stale concurrent session snapshots from overwriting newer usage
  • read sidebar and subagent context usage from V2 messages and models
  • follow transcript-order undo and redo boundaries for context tokens while preserving cumulative cost

Testing

  • core session projector and runner tests
  • TUI data race and undo ordering regression tests
  • focused package checks and interactive V2 TUI smoke test

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