Repository navigation
fix: report the latest step tokens instead of accumulating across steps - #151
enternal111 wants to merge 2 commits into
Conversation
|
@codex review |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b7293ca26
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@codex security review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Fixes #150
Which problem is this PR solving?
session.total_tokensreports the arithmetic sum of every LLM step's full-context token count instead of the conversation's current context size. A session with 10 calls averaging 12M tokens each reports ~120M instead of ~12M.Short description of the changes
In
accumulateTotals(src/handlers/step.ts), replace the running sum with the latest step's value. Each step'sd.tokensrepresents the full conversation context for that call, not an incremental delta.handleUsageUpdatedin session.ts already provides the authoritative cumulative replacement viasession.usage.updatedevents.How Has This Been Tested?
bun run typecheckbun run lintbun test