Codex Desktop Profile token usage does not increase despite local token growth and analytics diagnostics
What version of Codex are you using?
- Codex Desktop:
26.623.101652(CFBundleVersion4674) - Bundled/linked CLI:
codex-cli 0.142.5 - Platform: macOS
26.5.1(25F80), Apple Siliconarm64 - 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:31to2026-07-03 17:24:31local time - Local token total increased from
351,318,464to357,178,221 - Local delta:
5,859,757tokens - Remote Profile todays bucket stayed at
940,450 - Remote Profile delta:
0tokens - Gap:
5,859,757tokens - 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 / 24failed 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
TurnTokenUsageFactfor 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 fullwould 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
- #25479: Profile usage stats stale/incomplete compared with local
state_*.sqlite - #23686: Codex Analytics personal usage chart shows no data
- #25762: Profile token activity date/timezone mismatch
- #25354: Profile/Usage UI can become unavailable despite backend data being available
- #17880: Cloudflare/WAF/network issues involving
/backend-api/codex/analytics-events/events
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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗