Skip to content

Significant accounting issues for codex #1434

Description

@MilesCranmer

What happened?

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:

Steps to reproduce

N/A

Expected behavior

No response

Version

20.0.17

Activity

  1. github-actions commented on Jul 12, 2026

    @github-actions
    Contributor

    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.

    See CONTRIBUTING.md.

  2. ryoppippi commented on Jul 12, 2026

    @ryoppippi
    Member

    thank you for reporting? could you investigate it?

  3. MilesCranmer commented on Jul 12, 2026

    @MilesCranmer
    ContributorAuthor

    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.

  4. MilesCranmer commented on Jul 12, 2026

    @MilesCranmer
    ContributorAuthor

    Hi @ryoppippi, here is my fix: #1435. (I think the auto-close is active unless you write lgtmi or something?)

  5. yeqiugt commented on Jul 14, 2026

    @yeqiugt

    this is very important to me, hope to merge quickly. Thank you.

  6. axisrow commented on Jul 16, 2026

    @axisrow
    Contributor

    +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.

  7. ryoppippi commented on Jul 20, 2026

    @ryoppippi
    Member

    ok i'll take a look. thanks

  8. ryoppippi commented on Jul 20, 2026

    @ryoppippi
    Member

    lgtm

  9. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    @MilesCranmer approved for issues and PRs. Your future issues and PRs will not be auto-closed.

    See CONTRIBUTING.md.

  10. added a commit that references this issue on Jul 25, 2026
    409b4a5
  11. ryoppippi commented on Aug 31, 2026

    @ryoppippi
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage:resolvedResolved by a later change or current implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions