Description#
The usage page reports Claude Code usage only, even with heavy daily Codex use, when Codex is configured through providerInstances (multiple instances, each with its own CODEX_HOME / shadow home) rather than the legacy single-instance settings field.

Reproduction#
- Configure one or more Codex instances in
providerInstances with a custom CODEX_HOME (the legacy providers.codex field stays empty, which is what the settings UI produces for instance-based setups).
- Run Codex turns; rollouts land under the configured home's
sessions directory.
- Open the usage page: Codex shows zero usage.
Version or commit#
Reproduced on main @ 963ebf5b (screenshot above is from that commit); also present in the current nightly.
Impact#
Minor in the scheme of things — the usage page is brand new and this only matters for multi-instance setups. Within that scope the numbers are silently wrong (a whole provider omitted, no error shown), which seemed worth reporting before the page reaches a wider audience.
Cause#
UsageService.resolveTranscriptDirs resolves transcript directories only from the legacy settings.providers.<kind> blobs. For instance-based setups that blob decodes to defaults, so the scan reads ~/.codex/sessions only. Instances that use the default home still show up; any instance whose home differs from the default (custom CODEX_HOME, shadow home on a custom shared home) is never scanned.
I have a fix ready and will attach a PR.
I reproduced a stronger variant of this on Linux with
t3@0.0.33-nightly.20260809.1042: the Usage page settles at $0.00 / 0 processed tokens for every provider, even though both Codex and Claude have substantial recent transcript history.Environment that exposes it#
The T3 server is intentionally launched with separate workspace and provider homes:
This is useful for a remote server:
HOME=/srv/projectsmakes the project picker open at the workspace root, whileCODEX_HOME=/root/.codexkeeps the Codex state/auth location explicit.The persisted settings have no legacy
providersobject. Claude is configured throughproviderInstanceswith a customconfig.homePath. Codex uses the process-levelCODEX_HOME.Observed resolution#
The shipped
UsageService.resolveTranscriptDirsreads:It does not enumerate
settings.providerInstances.For Codex, the empty legacy config reaches
resolveCodexHomeLayout, whose default is based onNodeOS.homedir(). In this process:The usage scan consequently resolves these nonexistent roots:
The real roots are:
So this is not limited to an explicitly configured custom Codex instance: setting
CODEX_HOMEindependently ofHOMEis enough to lose all Codex usage. Reading only the legacy provider blob also loses Claude usage configured by the currentproviderInstancesmodel.Evidence that the transcripts are valid#
For the same 30-day window shown in the UI, a read-only reproduction of the parsing rules shipped in
.1042found:These figures are only intended to prove that compatible, nonzero records exist; they are not asserted as billing totals (and Codex fork accounting is separately covered by #5758).
The live
server.getUsageSummarycalls complete successfully. There is no server-side read failure: the service returns an empty summary because both resolved roots are missing. That explains why the settled UI confidently renders zeros instead of an error. A transient reconnect can separately flash the generic “environment could not report usage” message, but it is not the cause of the persistent zero result.Expected behavior#
Usage collection should use the same effective provider-home resolution as provider execution:
providerInstancesfor Claude and Codex, rather than reading onlysettings.providers.<kind>.homePath, honorCODEX_HOMEbefore falling back tohomedir()/.codex.Suggested regression coverage#
HOME !== CODEX_HOME, with no explicitproviderInstances.codexentry.providerInstances.<id>.config.homePath.This reproduction confirms the cause described in the issue and shows that it affects the standard process-level
CODEX_HOMEpath as well as custom instance homes.