Repository navigation
fix(agent-sessions): token, cost and call roll-up correctness - #1122
Merged
Merged
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
- Warning · F1 ·
countedToolCallsdedupes the page only, the list still counts a paused call twice ·packages/agent-sessions/src/session-summary.ts:799
What was checked
- Read the head
countedToolCallsand 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 andkeptClaimmatch the netting the list applies (Cost > 0/ token reporters), read atsession-summary.ts:636
2ad793e · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.
Loading