You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show plan usage limits for ChatGPT-connected (managed) Codex accounts
#16876
Codex accounts connected with "Sign in with ChatGPT" (the managed authentication added in #14290) never show plan usage in Usage → Limits. They show a static "ChatGPT usage — View usage in ChatGPT with your connected account → Manage usage" card instead. An instance pointed at the user's own Codex CLI shows live 5-hour and weekly bars for the same kind of account.
This is intentional in the current code. The managed provider publishes a hard-coded unsupported result and never probes:
constusageLimits={checkedAt: base.checkedAt,windows: [],unavailable: {reason: "unsupported",message: "ChatGPT tracks subscription usage across connected apps. Open Usage settings with the account you connected to Codex."},externalUsage: {label: "ChatGPT usage",url: "https://chatgpt.com/#settings/Usage"}};
#14889 also notes that the managed sign-in "publishes its limits as unsupported on purpose", so reset-time features skip these accounts too.
Why this should change
Managed sign-in is now the recommended flow. It is what onboarding offers, and feat(codex): connect ChatGPT accounts with managed authentication #14290 is built around one provider instance per account (personal and work). Multi-account users are exactly the people who need to see how much quota each account has left. Today they have to open chatgpt.com, signed in as the right account, once per account.
The only workaround drops managed auth. I got the bars back by switching the instance to setupMode: "existing" with its own homePath (CODEX_HOME) and running codex login there. Both accounts then show side by side in Usage → Limits. That works, but it gives up everything feat(codex): connect ChatGPT accounts with managed authentication #14290 provides: OAuth inside T3, token refresh, remote hand-off and managed installation.
"Tracked across connected apps" is a reason to show the number, not to hide it. The 5-hour and weekly windows are account-wide. The Codex CLI is also a ChatGPT-connected app, and T3 already displays its windows. A managed instance would report the same account-wide percentage. Because other apps consume the same quota, it matters more, not less, to see the remaining amount before starting a long task.
The data is available programmatically
The ChatGPT backend serves these windows to OAuth clients:
GET https://chatgpt.com/backend-api/wham/usage
Authorization: Bearer <ChatGPT OAuth access token>
chatgpt-account-id: <from the token's https://api.openai.com/auth claim>
The response contains rate_limit.primary_window and rate_limit.secondary_window, each with used_percent and reset_at. That covers the 5-hour and weekly limits.
Pi already does this. For its ChatGPT-OAuth openai-codex provider, Pi shows both windows in its footer through the pi-codex-limit extension. It sends exactly the request above using the session's OAuth token. Another app that signs in with ChatGPT can show these windows, so the managed T3 instance could too.
Not verified: whether the token T3 obtains for managed instances (scope chatgpt.tokens.use.direct, T3's own client ID) is accepted by /wham/usage. I haven't tested that. If it isn't, it would be useful to say so in the code comment or in the UI, so the "unsupported" state has an explicit reason.
Proposal
Probe usage for managed instances. Call /wham/usage, or the equivalent app-server call, with the managed token, and publish the windows through the existing usageLimits path. Account labels, banked resets and the reset-time fallback from fix(server): Codex usage-limit stops take the reset time shown in Limits #14889 would then work for these instances as well.
Keep the "Manage usage" link as a secondary action. Show it next to the bars, and fall back to the current card only when the probe fails or the token lacks access.
Environment
T3 Code 0.0.46-nightly.20261007.2774 (desktop)
macOS 27.0.1
codex-cli 0.160.1 (for the existing-mode comparison)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
Codex accounts connected with "Sign in with ChatGPT" (the managed authentication added in #14290) never show plan usage in Usage → Limits. They show a static "ChatGPT usage — View usage in ChatGPT with your connected account → Manage usage" card instead. An instance pointed at the user's own Codex CLI shows live 5-hour and weekly bars for the same kind of account.
This is intentional in the current code. The managed provider publishes a hard-coded unsupported result and never probes:
#14889 also notes that the managed sign-in "publishes its limits as unsupported on purpose", so reset-time features skip these accounts too.
Why this should change
setupMode: "existing"with its ownhomePath(CODEX_HOME) and runningcodex loginthere. Both accounts then show side by side in Usage → Limits. That works, but it gives up everything feat(codex): connect ChatGPT accounts with managed authentication #14290 provides: OAuth inside T3, token refresh, remote hand-off and managed installation.The data is available programmatically
The ChatGPT backend serves these windows to OAuth clients:
The response contains
rate_limit.primary_windowandrate_limit.secondary_window, each withused_percentandreset_at. That covers the 5-hour and weekly limits.Pi already does this. For its ChatGPT-OAuth
openai-codexprovider, Pi shows both windows in its footer through thepi-codex-limitextension. It sends exactly the request above using the session's OAuth token. Another app that signs in with ChatGPT can show these windows, so the managed T3 instance could too.Not verified: whether the token T3 obtains for managed instances (scope
chatgpt.tokens.use.direct, T3's own client ID) is accepted by/wham/usage. I haven't tested that. If it isn't, it would be useful to say so in the code comment or in the UI, so the "unsupported" state has an explicit reason.Proposal
/wham/usage, or the equivalent app-server call, with the managed token, and publish the windows through the existingusageLimitspath. Account labels, banked resets and the reset-time fallback from fix(server): Codex usage-limit stops take the reset time shown in Limits #14889 would then work for these instances as well.Environment
existing-mode comparison)Related
All reactions