Tray menu does not show current Plan allowance when multiple ChatGPT accounts are linked - Codex
Quick fix
Upgrade cc-switch: the tray menu failing to show allowance with multiple linked ChatGPT accounts is a confirmed bug, fixed in commit e53ab21 and released…
Symptom
Section titled “Symptom”如果绑定多个官方chatgpt的时候,菜单里面的弹窗不显示当前Plan的额度When multiple official ChatGPT accounts are linked, the tray menu popup does not show the current Plan allowance.
The maintainer identified the cause: after multiple ChatGPT accounts were linked, each account had its own official card, but the tray menu had only one allowance cache at the application level, following the current Codex CLI login state. It could not tell which account the allowance belonged to. To avoid showing one account’s numbers under another account’s card, the tray deliberately hid allowance for these linked-account cards. The main interface used a separate account-specific lookup path, so its values remained correct. The fix changed the tray to read allowance by account, matching the card display. The card’s usage toggle also controls whether the tray shows allowance, and the tray follows the new account immediately after switching or relinking.
Two other variants under the same “missing OpenAI/ChatGPT account allowance and usage figures” topic have different mechanisms: #5184 (closed) concerns Codex usage statistics omitting subagent Tokens. The parser preferred `payload.session_id` (the parent thread ID) to generate request IDs as `codex_session:{session_id}:{event_index}`. Since `event_index` starts at 1 in every subagent JSONL file, all subagents under the same parent thread generated identical request IDs. The `proxy_request_logs.request_id` unique constraint and `INSERT OR IGNORE` silently discarded them. Because the sync cursor then advanced, the records could not be recovered. #7340 (still open) concerns usage from background Codex Desktop tasks, such as title generation, background suggestions, and safety checks, not being counted. These events, including `ephemeral_generation_token_usage`, are written to logs in `~/Library/Logs/com.openai.codex/`, while the current scanner collects only sessions and archived_sessions JSONL files. A contributor closed an unmerged PR #7341; the issue remains unresolved.
First confirm that usage display is enabled on the account card. The maintainer confirmed that this toggle also controls whether the tray menu shows allowance. The reporter had it enabled and still saw no allowance, which was the bug itself.
Upgrade cc-switch to a version containing fix commit e53ab21. When replying to the report, the maintainer said the issue had been identified and fixed, and that commit e53ab21 would ship in the next release. After upgrading, the tray reads allowance for the linked account, matching the main interface card.
After upgrading, switch or relink the ChatGPT account once. The tray menu will then immediately show allowance for the new account.
If you are seeing a usage-statistics variant: the subagent Token undercount (#5184) is closed with a root-cause analysis in the issue; use the latest version. Missing usage from Codex Desktop background tasks (#7340) remains open with no released fix. Follow that issue for updates, and do not assume local statistics are complete when these background calls are not covered.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- Is usage display enabled?
- The reporter confirmed it was enabled. The tray still showing no allowance when enabled is the symptom of this bug, not a settings issue. After the fix, this toggle continues to control whether the tray shows allowance.
- Does the allowance shown on the main interface card look correct?
- Yes. The maintainer explained that the main interface card uses a separate account-specific lookup path, so its value was always correct. Only the tray menu hid allowance because it could not distinguish multiple linked accounts.
- Why are Tokens generated by Codex subagents undercounted in usage statistics?
- This is a separate bug reported in #5184: in a subagent’s session_meta, `payload.id` is the subagent’s own ID and `payload.session_id` is the parent thread ID. The old parser used the latter with `event_index`, which starts at 1 in each file, to generate request IDs. This caused ID collisions within the same thread group; the unique constraint silently discarded the records, so statistics were low and resync could not restore them.
- Why are usage figures for Codex Desktop title generation and background suggestions missing from CC Switch statistics?
- This is an unresolved gap reported in #7340: usage events for these background tasks are written to desktop app logs (on macOS, `~/Library/Logs/com.openai.codex/`), while CC Switch scans only Codex session JSONL files and cannot cover them. The reporter verified that 82 background events during the same period (about 5,025,338 tokens) were not recorded. The author closed PR #7341 without merging it; there is no fix yet.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.