Skip to content

Codex seat-based workspace with a 0-credit monthly cap is treated as out of usage, new threads switch to the fallback model #34234

Closed

Description

@joaosamouco

What happened

When I open a new thread, T3 Code shows "Using Claude Opus 5.5 · Codex is out of usage · resets 01/12 0:00" and switches the composer to my configured fallback model (Opus 5.5 Medium) instead of my default (GPT-6.1-Sol High). Codex is not out of usage: the 5h session is at 0% and weekly at 14%, and clicking "Use GPT-6.1-Sol" and sending a message works normally.

The account is on a ChatGPT Business/Enterprise workspace that uses paid seats, not per-user credits.

Diagnosis

For seat-based workspaces, Codex reports an individualLimit with a zero credit cap (limit: "0", used: "0.0", remainingPercent: 0). The seat allowance (primary/secondary) has plenty of room, and Codex itself reports ordinaryUsageAllowed: true and rateLimitReachedType: null.

  • apps/server/src/provider/codexUsageLimits.ts (codexRateLimitsToWindows, ~L86-95) maps individualLimit to a monthly window id: "individual" / "Monthly credit limit" with usedPercent = 100 - remainingPercent = 100%, so a 0-of-0 credit cap looks fully used.
  • packages/shared/src/usageLimits.ts (exhaustedUsageWindow) has no Codex-specific case; it falls through to default: return exhausted[0], so any Codex window at 100% marks the whole provider exhausted.
  • resolveNewThreadModelSelection then swaps the new-thread default to the fallback selection, and the banner shows the credit cap's reset (Dec 1) as "resets 01/12".
  • The same check backs text-generation fallback and MCP thread creation, so those paths probably fall back too.

Credits are only spent once the seat allowance runs out, so a used-up (or zero) credit cap should only block when primary/secondary are also at 100%. Possible fixes: skip individualLimit when limit is "0", treat the individual window as blocking only when the plan windows are also exhausted, and/or respect ordinaryUsageAllowed: true from account/rateLimits/read.

Line references are against main @ fc5edd3 (the build is a nightly, so they are approximate).

Steps to reproduce

  1. Sign in to Codex with a ChatGPT Business/Team workspace that uses paid seats, where the admin gives members no monthly credits (account/rateLimits/read returns individualLimit.limit = "0", remainingPercent = 0).
  2. In Settings → New threads, set Model to a Codex model (e.g. GPT-6.1-Sol) and Fallback model to another provider (e.g. Claude Opus 5.5).
  3. Open a new thread.
  4. Expected: the Codex default is used, since session and weekly usage are well below 100%. Actual: the composer switches to the fallback model and shows "Codex is out of usage · resets <1st of next month>". Usage → Limits shows "Monthly credit limit 100%".

Version

0.1.9-nightly.20261111.4501 (desktop app, desktop-managed local server)

Environment

macOS 27.2.0 (darwin arm64), Node v24.22.1, codex-cli 0.167.1, planType "team"

Evidence

# codex app-server account/rateLimits/read (rateLimitsByLimitId.codex; ids removed)
"ordinaryUsageAllowed": true,
"planType": "team",
"rateLimitReachedType": null,
"primary":   { "usedPercent": 0,  "windowDurationMins": 300 },
"secondary": { "usedPercent": 14, "windowDurationMins": 10080 },
"credits":   { "hasCredits": true, "unlimited": false },
"individualLimit": { "limit": "0", "used": "0.0", "remainingPercent": 0, "resetsAt": 1796083200 },
"spendControlReached": true

# T3 caches/codex.json usageLimits.windows
primary session 0% | secondary weekly 14% | individual monthly 100% "Monthly credit limit", resets 2026-12-01

Related issues

#27824 / #27792 (credit-aware fallback when the weekly allowance is exhausted; that PR treats an exhausted monthly credit cap as a block, so it would not fix this). #15895 / #14614 added the individual window. #32015 is the same exhaustedUsageWindow default-case problem, for Claude.

Fix applied or workaround

Nothing changed on the machine. Workarounds: clear the Fallback model setting, or click "Use GPT-6.1-Sol" on each new thread.

Filed by

Claude Code (claude-opus-5-5) via t3 triage

Activity

  1. joaosamouco commented on Nov 11, 2026

    @joaosamouco
    Author
    file-abb93a8a01040f3688863220e452b39b file-1aaa7864803a8ba7711727efa9ddfcd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions