Skip to content

Codex discovery drops any rollout whose originator doesn't start with "codex" #873

Closed

Description

@kelchm

Problem

The Codex provider only counts rollouts whose session_meta.payload.originator passes:

originator === "string" && entry.payload.originator.toLowerCase().startsWith("codex")

But originator is a free-form client identity, not a format marker. Any tool driving codex app-server (or embedding codex) writes structurally identical rollouts under ~/.codex/sessions/ with its own originator string — that's the field working as intended. The filter therefore silently excludes entire categories of usage from every frontend that isn't Codex itself.

This has now bitten at least three originators: Codex Desktop (exact-match era, fixed in #50 by relaxing to a prefix), JetBrains.IntelliJ IDEA (#626, open), and t3code_desktop (T3Code), reported here. Each fix so far has admitted one more spelling; the next third-party frontend breaks it again.

Concrete data

T3Code drives codex app-server; its rollouts begin:

{"type": "session_meta", "payload": {"originator": "t3code_desktop", "source": "vscode", "cwd": "..."}}

In one week on my machine, 34 such rollouts were skipped while only 2 sessions (both Codex Desktop) were counted. The skipped sessions carry full token_count events and are not small: one top-level thread ended at 83.6M cumulative tokens, a spawned collab subagent at 23.4M, and 20 auto-review ("guardian") subagent rollouts totaled 9.0M. (Totals dominated by cached input — but that's the same basis CodeBurn prices from.)

Note this includes subagent-sourced rollouts ("source": {"subagent": ...}). Counting them does not double-count: I verified a parent thread's cumulative token_count excludes its child threads (the parent rollout's total matches the parent's own usage exactly).

Expected behavior

Any structurally valid rollout under ~/.codex/sessions/ is counted, regardless of which frontend created it.

Suggested fix

Stop using originator for discovery. A session_meta first line plus token_count events is already a strong structural signal that a file is a real codex rollout. Keep originator for what it's good at — labeling/attribution in reports — and this class of issue (this one, #626, and the next one) closes permanently.

Happy to provide a redacted sample rollout if useful.

Activity

  1. added a commit that references this issue on Aug 3, 2026
    eece4cf
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions