What version of Codex are you using?
- Codex Desktop:
26.623.101652 (CFBundleVersion 4674)
- Bundled/linked CLI:
codex-cli 0.142.5
- Platform: macOS
26.5.1 (25F80), Apple Silicon arm64
- Subscription: Pro
What issue are you seeing?
The Codex Desktop Profile page token activity / daily usage bucket does not reliably increase even though local Codex token totals are increasing.
This appears similar to #25479, where local ~/.codex/state_*.sqlite token totals diverge from the Profile API / UI buckets. I am opening a separate issue because I collected a short-window diagnostic that compares:
- local token growth,
- analytics upload signals,
- remote Profile bucket growth,
- queue-drop signals,
- network probe signals.
Observed behavior
During a 30-minute observation window:
- Observation window:
2026-07-03 16:54:31 to 2026-07-03 17:24:31 local time
- Local token total increased from
351,318,464 to 357,178,221
- Local delta:
5,859,757 tokens
- Remote Profile todays bucket stayed at
940,450
- Remote Profile delta:
0 tokens
- Gap:
5,859,757 tokens
- Analytics POST 200 observed in that exact 30-minute window:
0
- Analytics error count observed in that exact 30-minute window:
0
- Analytics queue drops observed:
0
- Profile fetch errors observed:
2
- Network probe status:
LOCAL_NETWORK_SUSPECT
- Network probes:
16 / 24 failed at DNS/TCP/TLS/HTTP reachability checks
A later short local check did observe an analytics POST 200 and still showed no queue drops, so the upload path is not completely dead. However, Profile daily usage still appears to lag or miss local token growth.
Expected behavior
If Codex records local token usage for completed turns, the Profile token activity / daily usage bucket should eventually reflect that usage, or the UI/API should document the accounting differences clearly.
In particular, it should be clear whether the Profile page:
- excludes some local sessions,
- excludes archived sessions,
- excludes subagent/main-agent usage differently,
- samples or delays usage,
- depends on analytics upload events,
- can miss token fields when turn events are emitted before token usage facts arrive.
Diagnostic notes
From the open-source Codex code path, the analytics flow appears to be turn-based:
- Core records
TurnTokenUsageFact for a turn.
- The analytics reducer combines turn facts and emits
codex_turn_event.
- The analytics client queues events and POSTs them to
/codex/analytics-events/events.
- The queue size appears bounded, and
queue is full would be logged if events were dropped.
One important detail: token fields in the codex_turn_event appear optional. If a turn event is emitted before token_usage is attached, it may be possible for a turn event to be uploaded without total_tokens. I have not confirmed this is happening, but it is a plausible area to inspect given the local-vs-remote gap.
Related public reports
Privacy / safety
No auth token, cookie, Authorization header, full account ID, or raw POST body is included here. The numbers above are aggregated local/remote token totals and status-level diagnostics only.
What version of Codex are you using?
26.623.101652(CFBundleVersion4674)codex-cli 0.142.526.5.1(25F80), Apple Siliconarm64What issue are you seeing?
The Codex Desktop Profile page token activity / daily usage bucket does not reliably increase even though local Codex token totals are increasing.
This appears similar to #25479, where local
~/.codex/state_*.sqlitetoken totals diverge from the Profile API / UI buckets. I am opening a separate issue because I collected a short-window diagnostic that compares:Observed behavior
During a 30-minute observation window:
2026-07-03 16:54:31to2026-07-03 17:24:31local time351,318,464to357,178,2215,859,757tokens940,4500tokens5,859,757tokens0002LOCAL_NETWORK_SUSPECT16 / 24failed at DNS/TCP/TLS/HTTP reachability checksA later short local check did observe an analytics POST 200 and still showed no queue drops, so the upload path is not completely dead. However, Profile daily usage still appears to lag or miss local token growth.
Expected behavior
If Codex records local token usage for completed turns, the Profile token activity / daily usage bucket should eventually reflect that usage, or the UI/API should document the accounting differences clearly.
In particular, it should be clear whether the Profile page:
Diagnostic notes
From the open-source Codex code path, the analytics flow appears to be turn-based:
TurnTokenUsageFactfor a turn.codex_turn_event./codex/analytics-events/events.queue is fullwould be logged if events were dropped.One important detail: token fields in the
codex_turn_eventappear optional. If a turn event is emitted beforetoken_usageis attached, it may be possible for a turn event to be uploaded withouttotal_tokens. I have not confirmed this is happening, but it is a plausible area to inspect given the local-vs-remote gap.Related public reports
state_*.sqlite/backend-api/codex/analytics-events/eventsPrivacy / safety
No auth token, cookie, Authorization header, full account ID, or raw POST body is included here. The numbers above are aggregated local/remote token totals and status-level diagnostics only.