You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate Claude fresh-process resume accounting compatibility #1960
Investigate against latest main and merged #1956. This is a source-level compatibility hypothesis, not a demonstrated live regression.
Separate from #1945 / #1956 Stop, exit, steer and Codex reconciliation; #1435 addressed warm-process totals. Initial dedup checked those and existing Claude resume/accounting issues; no dedicated fresh-process baseline issue found.
Run only isolated synthetic/captured fixtures for a completed turn, process restart, resumed result, model changes and warm follow-ups; preserve observed model IDs, provider-reported totals and pre-2.1.277 semantics.
Record supported conclusions and limits. If a failure reproduces, propose a minimal session-keyed baseline with migration/reload acceptance coverage on this issue.
No paid turns, real credentials, user setting changes, historical transcript aggregation or inferred missing amounts.
Investigation reproduced a source-supported compatibility failure with synthetic frames through the real runner and Store reload. This is NOT evidence of a live account billing discrepancy.
Audited latest fetched main 24119d5fc6f5ed438e3e78c991e8fc2f1ed7c703, merged #1956 (4dbae5ef, head 0a1420cb), and deduplicated against #1945, #1435 and existing Claude resume/accounting issues. Solenta launches an external native CLI rather than a pinned SDK dependency. Checked-in recordings use 2.1.283; installed package is 2.1.318.
Protocol verification: primary docs https://code.claude.com/docs/en/agent-sdk/cost-tracking#accumulate-costs-across-multiple-calls date restored SDK/print resume totals to 2.1.277. Independently downloaded and integrity-verified the exact public 2.1.283 darwin-arm64 native package, without executing it. Its embedded print resume path restores a saved cost-state into the same ledger used by result.total_cost_usd/modelUsage; absent cost-state takes a different path. Installed 2.1.318 has equivalent restoration. Therefore version alone is insufficient evidence of restoration.
No persisted Claude handle initialization exists: claude-usage.js reads lastTotalCostUsd / lastModelUsage / unattributedModelUsage from the process handle; spawnForTurn makes a new empty handle, while Store retains previous thread usage. Codex sessionUsageBaseline is separate.
Reproduction: completed A turn (10 inputs, $0.01), stop fake child, wait, flush/reload Store, create fresh runner resuming same native session, B turn (4 new inputs, $0.02) reporting cumulative $0.03 with A+B model totals, then warm B follow-up (2 inputs, $0.01), cumulative $0.04. Current Store ends at 26 inputs and $0.05 instead of 16 and $0.04; daily spend is $0.05 and old model A is recorded twice. Distinct process PIDs and --resume are asserted. Raw provider result objects and observed wire model IDs remain unchanged.
Controls: all-warm totals correct; legacy/reset process totals correct; blindly restoring an old baseline undercounts reset semantics. Existing captured restart-before has NO completed result and cannot independently demonstrate this issue. Five investigation probes and 11 existing helper tests pass. Probe assertions describe current faulty behavior, not a fix.
Reviewable artifacts on this thread: research_notes/claude-resume-accounting/{README.md,fixtures.json,repro.cjs}; review itinerary added. No production code changed, paid turns, real credentials/settings, or historical transcript aggregation. Implementation proposal will be linked separately so #1956 Stop/exit/steer and Codex reconciliation remain out of scope.
Investigation and reviewable reproducer completed; proposed minimal implementation and migration/reload acceptance coverage are queued separately in #1961 (plan:todo). No production fix is claimed. Five isolated probes plus eleven existing helper tests pass; source-supported restored-session fixture duplicates .01 USD and 10 old-model input tokens on fresh-process resume. Live billing impact remains unmeasured.
Activity
currentbits commentedon Nov 8, 2026
Investigation reproduced a source-supported compatibility failure with synthetic frames through the real runner and Store reload. This is NOT evidence of a live account billing discrepancy.
Audited latest fetched main
24119d5fc6f5ed438e3e78c991e8fc2f1ed7c703, merged #1956 (4dbae5ef, head0a1420cb), and deduplicated against #1945, #1435 and existing Claude resume/accounting issues. Solenta launches an external native CLI rather than a pinned SDK dependency. Checked-in recordings use 2.1.283; installed package is 2.1.318.Protocol verification: primary docs https://code.claude.com/docs/en/agent-sdk/cost-tracking#accumulate-costs-across-multiple-calls date restored SDK/print resume totals to 2.1.277. Independently downloaded and integrity-verified the exact public 2.1.283 darwin-arm64 native package, without executing it. Its embedded print resume path restores a saved cost-state into the same ledger used by result.total_cost_usd/modelUsage; absent cost-state takes a different path. Installed 2.1.318 has equivalent restoration. Therefore version alone is insufficient evidence of restoration.
No persisted Claude handle initialization exists: claude-usage.js reads lastTotalCostUsd / lastModelUsage / unattributedModelUsage from the process handle; spawnForTurn makes a new empty handle, while Store retains previous thread usage. Codex sessionUsageBaseline is separate.
Reproduction: completed A turn (10 inputs, $0.01), stop fake child, wait, flush/reload Store, create fresh runner resuming same native session, B turn (4 new inputs, $0.02) reporting cumulative $0.03 with A+B model totals, then warm B follow-up (2 inputs, $0.01), cumulative $0.04. Current Store ends at 26 inputs and $0.05 instead of 16 and $0.04; daily spend is $0.05 and old model A is recorded twice. Distinct process PIDs and --resume are asserted. Raw provider result objects and observed wire model IDs remain unchanged.
Controls: all-warm totals correct; legacy/reset process totals correct; blindly restoring an old baseline undercounts reset semantics. Existing captured restart-before has NO completed result and cannot independently demonstrate this issue. Five investigation probes and 11 existing helper tests pass. Probe assertions describe current faulty behavior, not a fix.
Reviewable artifacts on this thread: research_notes/claude-resume-accounting/{README.md,fixtures.json,repro.cjs}; review itinerary added. No production code changed, paid turns, real credentials/settings, or historical transcript aggregation. Implementation proposal will be linked separately so #1956 Stop/exit/steer and Codex reconciliation remain out of scope.
currentbits commentedon Nov 8, 2026
Investigation and reviewable reproducer completed; proposed minimal implementation and migration/reload acceptance coverage are queued separately in #1961 (plan:todo). No production fix is claimed. Five isolated probes plus eleven existing helper tests pass; source-supported restored-session fixture duplicates .01 USD and 10 old-model input tokens on fresh-process resume. Live billing impact remains unmeasured.