fix: persist prompt response token usage#407
Conversation
|
Codex review: passed. Reviewed June 23, 2026, 6:59 AM ET / 10:59 UTC. Summary Reproducibility: yes. source-level reproduction is high confidence: on current main, usage normalization only reads Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Keep the focused prompt-response usage persistence and regression tests, with release notes handled by the release-owned process. Do we have a high-confidence way to reproduce the issue? Yes, source-level reproduction is high confidence: on current main, usage normalization only reads Is this the best way to solve the issue? Yes, recording prompt-response usage after the update drain reuses the existing token normalization and persisted/status surfaces without adding new config or public naming conventions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a6907746b5bd. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
🦞✅ Source: No actionable findings remain. I removed the repair-loop label and left the PR open for maintainer review and merge. Automerge progress:
|
Summary
PromptResponse.usage/ JSON-RPCresult.usageinto the session conversation after the prompt update drain completes.usage_update._meta.usageandusage_update.costpaths.usage_updateonly carries{ used, size }, includinggetStatus().usage.Fixes #406
Validation
pnpm run build:testnode --test dist-test/test/integration.test.js dist-test/test/runtime-manager.test.jspnpm run check