Repository navigation
Price a resumed Codex thread once, at its newest leg - #505
Merged
Merged
Conversation
There was a problem hiding this comment.
Round 1 — reviewed head e67053de — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.
terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.
Verdict: 1 blocking, 0 advisory.
1 finding attached to the lines below.
One blocking finding recorded: older Claude version overrides cause resumed-session totals to undercount. Rejected: none.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #479.
A session that sleeps and resumes writes one record per leg. For Codex (
exec resume) each leg's usage is the whole thread's cumulative total. Claude Code has also been cumulative since 2.1.277, but the CLI version that ran a session is not recorded and an override can pin an older CLI, so Claude legs keep summing (an overstatement, never an undercount).session_totalssummed every leg, soouterloop statusoverstated a resumed session by about the number of legs. Hermes starts a fresh process per leg, so its legs are per invocation and still sum.backendandsession_id. Totals keep only the newest indexed leg of each Codex session (CUMULATIVE_BACKENDS), and everything else sums as before.Upgrading:line).docs/session-capture.mdcorrected: it said resumed usage came from the current invocation only.One behavior test: three cumulative legs total to the last leg's cost.
Built by GLM-5.3 (self-reviewed), reviewed by Codex (it found Claude Code is cumulative too, confirmed against Claude Code's changelog, fixed in e67053d), final read by Claude Opus 5.5.