Skip to content

[Bug]: Codex reports "workspace is out of credits" when the weekly limit ran out, hiding the reset time T3 already shows #10472

Description

@vitalyiegorov

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Use a Codex instance on a ChatGPT Business or Enterprise workspace and run it until the weekly window is exhausted (Usage → Limits shows the Codex weekly bar at 0% left with a reset countdown).
  2. Send a message to any Codex thread.

The plan-limit variant: exhaust the 5-hour or weekly window on a Plus or Pro subscription and send a message.

Expected behavior

The turn fails and the error names the real cause and the next step, the way Claude does since #10321: the Codex usage limit was reached, when it resets, and, for a workspace, that there are no credits to continue sooner and who can add them.

Actual behavior

T3 relays OpenAI's sentence verbatim as a red runtime error, twice (timeline row and the failure line under the turn): "Your workspace is out of credits. Ask your workspace owner to refill in order to continue."

That sentence hides what actually happened. The Limits tab, from the same account/rateLimits/updated snapshot the adapter receives during that turn, shows the weekly window at 0% with a reset in 5d 5h. Credits are only the overflow a workspace may buy once a window is exhausted; the cause is the window, and the reset time T3 already holds is never shown. On a Plus or Pro plan the relayed text is "You've hit your usage limit. Try again in 3 hours 20 minutes." with no provider name and no link to the reset T3 knows about.

Mechanically, apps/server/src/provider/Layers/CodexAdapter.ts maps the error notification (codexErrorInfo: "usageLimitExceeded") straight to runtime.error with the provider's message, and the following failed turn/completed carries the same text as errorMessage. The rateLimitReachedType on the snapshot (rate_limit_reached, workspace_*_credits_depleted, workspace_*_usage_limit_reached) and the exhausted window's resetsAt are ignored on this path. Claude's adapter now latches the real cause during the turn and reports it when the turn ends (#10321); Codex has no equivalent.

Users read "out of credits" as a billing problem to escalate to their admin, when the honest answer is "your weekly limit resets in five days".

Codex thread after a limit stop, and the Limits tab for the same account at the same moment:

Codex thread: red runtime error 'Your workspace is out of credits. Ask your workspace owner to refill in order to continue.' shown twice Usage Limits tab: Codex weekly window 0% left, +100% in 5d 5h

Impact

Major degradation or frequent failure

Version or commit

main @ 6abdf37

Environment

macOS 15, desktop app; Codex CLI 0.153, ChatGPT Business workspace login; server on Linux

Logs or stack traces

# Codex app-server notifications observed during the turn, in order
error                       { error: { message: "Your workspace is out of credits. Ask your workspace owner to refill in order to continue.", codexErrorInfo: "usageLimitExceeded" }, willRetry: false }
account/rateLimits/updated  { rateLimits: { planType: "business", rateLimitReachedType: "workspace_member_credits_depleted", primary: { usedPercent: 100, windowDurationMins: 10080, resetsAt: <epoch, +5d 5h> } } }
turn/completed              { turn: { status: "failed", error: { message: <same sentence>, codexErrorInfo: "usageLimitExceeded" } } }
# T3 emits: runtime.error <same sentence>, then turn.completed failed with errorMessage <same sentence>

Screenshots, recordings, or supporting files

No response

Workaround

Open Usage → Limits to find the actual reset time.

Activity

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

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.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