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
I know this will get auto-closed but just wanted to let you know there are currently major accounting issues with codex for the past month @ryoppippi. I think it has something to do with subagents having all historical transcripts leading up to them get counted. For some days it seems like my usage is even 10x or 20x higher counting than expected. It might have something to do with recent codex updates, I am not too sure.
I'm looking into it now because it is deteriorating my personal tooling. If I succeed I can make a PR. Just wanted to make an issue to give a heads up.
There are other issues too for this. They were all auto-closed:
This issue was auto-closed. Issues from new contributors are auto-closed by default.
Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.
+1 from real data. On my history (1,524 rollout files; 122 forked_from_id, 97 thread_spawn), the giant "phantom" sessions on v20.0.17 are largely the parent's replayed token_count history being counted again inside the fork/subagent files — #1369's same-second heuristic misses replays that span 2+ seconds, which is most of them.
@MilesCranmer's #1435 is the right structural fix (parent→child matching via session_meta + prefix skip by delta equality). I reviewed it in #1435 — it holds up, with one small test suggestion.
@ryoppippi, could you reopen #1435? It was auto-closed (new contributor), and this is actively deteriorating people's local tooling.
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current main implementation covers this request. This item is kept for history and does not need to be reopened.
Activity
github-actions commentedon Jul 12, 2026
This issue was auto-closed. Issues from new contributors are auto-closed by default.
Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies
lgtmi, your future issues will stay open. If a maintainer replieslgtm, your future issues and PRs will stay open.See CONTRIBUTING.md.
ryoppippi commentedon Jul 12, 2026
thank you for reporting? could you investigate it?
MilesCranmer commentedon Jul 12, 2026
Will do! I've got a working patch (according to Codex's state_5.sql, it matches better) and am currently just trying to minify the diff.
MilesCranmer commentedon Jul 12, 2026
Hi @ryoppippi, here is my fix: #1435. (I think the auto-close is active unless you write
lgtmior something?)yeqiugt commentedon Jul 14, 2026
this is very important to me, hope to merge quickly. Thank you.
axisrow commentedon Jul 16, 2026
+1 from real data. On my history (1,524 rollout files; 122
forked_from_id, 97thread_spawn), the giant "phantom" sessions on v20.0.17 are largely the parent's replayedtoken_counthistory being counted again inside the fork/subagent files —#1369's same-second heuristic misses replays that span 2+ seconds, which is most of them.@MilesCranmer's
#1435is the right structural fix (parent→child matching viasession_meta+ prefix skip by delta equality). I reviewed it in #1435 — it holds up, with one small test suggestion.@ryoppippi, could you reopen
#1435? It was auto-closed (new contributor), and this is actively deteriorating people's local tooling.ryoppippi commentedon Jul 20, 2026
ok i'll take a look. thanks
ryoppippi commentedon Jul 20, 2026
lgtm
github-actions commentedon Jul 20, 2026
@MilesCranmer approved for issues and PRs. Your future issues and PRs will not be auto-closed.
See CONTRIBUTING.md.
fix(codex): dedupe replayed usage (#1435)
ryoppippi commentedon Aug 31, 2026
Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current
mainimplementation covers this request. This item is kept for history and does not need to be reopened.