Skip to content

fix(agent-sessions): token, cost and call roll-up correctness - #1122

Merged
JeremyFunk merged 11 commits into
mainfrom
fix/agent-sessions-usage-netting
Sep 29, 2026
Merged

JeremyFunk merged 11 commits into
mainfrom
fix/agent-sessions-usage-netting

fix(agent-sessions): state which paused tool-call copies the #21 merg…

2ad793e
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Sep 28, 2026 in 8m 24s

Confidence 3/5 · 1 issue to address

Confidence 3/5 · needs attention
The only file changed since the last review carries doc-only edits; the open list/page tool-call mismatch is the one thing left to settle.
quality 90/100 · 1 warning · tests covered · risk medium

The new head only documents which paused tool-call shapes countedToolCalls merges; the summary code is otherwise what the earlier reviews already read. Safe to merge, except that the list/page tool-call mismatch raised as F1 is still unfixed.

Still open from earlier reviews

What was checked
  • Read the head countedToolCalls and the session-page wiring: the paused copy is dropped only when a later same-id copy recorded a result and the paused one neither recorded nor failed (`session-summa…
  • Confirmed the list still counts tool calls as CH.sum($.IsToolCall) per index row (ai-sessions.ts:554), so F1's defect is unchanged at this head
  • costBySpan's zero-cost handling and keptClaim match the netting the list applies (Cost > 0 / token reporters), read at session-summary.ts:636

2ad793e · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.