I run two ChatGPT accounts through Codex. Work lives at ~/.codex (and a ~/.codex-work copy), personal at ~/.codex-personal, and both are logged into pi as openai-codex and openai-codex-2 in a pi-codex-multi pool. OpenUsage shows one Codex card: the work account's limits with the personal account's pi spend folded in. Yesterday that card read $703 of spend next to a weekly meter at 3% used. Two accounts, one card.
What I want is one card per ChatGPT account, matched by account id across Codex homes (CODEX_HOME, ~/.codex, ~/.config/codex, sibling ~/.codex-* dirs) and pi's auth.json entries. The account at the default home keeps the plain codex id so nothing moves for existing installs. Codex home credentials keep refreshing the way they do today; pi credentials stay read-only since pi rotates its own tokens under a lockfile. Spend splits per card: each card reads its own homes' rollouts, and pi sessions route by pi provider id.
This is Phase 5a of docs/research/account-first-plan.md and the same shape as the Claude Swap discovery in #1226, except it covers the Codex CLI's own CODEX_HOME convention instead of a specific switcher tool (#1263 covers xswap). I have the branch working against my two accounts and will open the PR against this issue.
I run two ChatGPT accounts through Codex. Work lives at
~/.codex(and a~/.codex-workcopy), personal at~/.codex-personal, and both are logged into pi asopenai-codexandopenai-codex-2in a pi-codex-multi pool. OpenUsage shows one Codex card: the work account's limits with the personal account's pi spend folded in. Yesterday that card read $703 of spend next to a weekly meter at 3% used. Two accounts, one card.What I want is one card per ChatGPT account, matched by account id across Codex homes (
CODEX_HOME,~/.codex,~/.config/codex, sibling~/.codex-*dirs) and pi'sauth.jsonentries. The account at the default home keeps the plaincodexid so nothing moves for existing installs. Codex home credentials keep refreshing the way they do today; pi credentials stay read-only since pi rotates its own tokens under a lockfile. Spend splits per card: each card reads its own homes' rollouts, and pi sessions route by pi provider id.This is Phase 5a of
docs/research/account-first-plan.mdand the same shape as the Claude Swap discovery in #1226, except it covers the Codex CLI's ownCODEX_HOMEconvention instead of a specific switcher tool (#1263 covers xswap). I have the branch working against my two accounts and will open the PR against this issue.