codex icon indicating copy to clipboard operation
codex copied to clipboard

Bug: Send button remains disabled globally after OpenAI usage is exhausted

Open Singrun opened this issue 2 months ago • 22 comments

What version of the Codex App are you using (From “About Codex” dialog)?

26.924.20706

What subscription do you have?

team

What platform is your computer?

No response

What issue are you seeing?

Summary

In ChatGPT/Codex version 26.917.62051 & ‘26.924.20706’, once the OpenAI provider reaches its usage limit, the Send button remains disabled even after switching to a valid third-party provider.

The issue affects both existing tasks and newly created tasks. This indicates that the disabled state is not scoped to a single conversation and is not caused by the third-party provider.

Environment

  • Product: ChatGPT/Codex desktop app
  • Version: 26.917.62051
  • Original provider: OpenAI
  • Replacement provider: Valid third-party provider
  • Date observed: September 24, 2026

Preconditions

  • The OpenAI provider has reached its usage limit.
  • The third-party provider API is valid and reachable.
  • The third-party provider can successfully handle requests independently.
  • The provider switch is accepted by the application.

Steps to reproduce

  1. Use the OpenAI provider in the desktop app.
  2. Exhaust the available OpenAI usage or reach the provider limit.
  3. Observe that the Send button becomes disabled.
  4. Switch the provider to a valid third-party provider.
  5. Select a compatible model.
  6. Open an existing task and attempt to send a message.
  7. Create a new task and attempt to send a message.

Actual behavior

The Send button remains greyed out in both:

  • existing tasks;
  • newly created tasks.

The behavior persists after switching to a valid third-party provider. The third-party API itself is functional, so the disabled state is not caused by provider availability or API credentials.

Expected behavior

After switching to a valid provider, the application should recompute the global composer availability state and allow the user to send messages.

Provider-specific usage exhaustion should not disable message composition globally after the active provider has changed.

Impact

The user cannot continue working through a configured third-party provider after OpenAI usage is exhausted.

Because newly created tasks are also affected, the issue can make the entire desktop app appear unable to send messages until the client state is reset or the usage window recovers.

Regression context

Previously, after OpenAI usage was exhausted, switching to a valid third-party provider still allowed messages to be sent. The current behavior appears to be a regression in version 26.917.62051.

Likely cause

The client may retain a global provider/quota failure state after the OpenAI provider becomes unavailable. The provider switch updates the selected provider but does not clear or recompute one or more global state values, such as:

  • canSend;
  • provider quota exhaustion;
  • global request availability;
  • composer disabled state;
  • cached authentication or capability validation;
  • an application-level error state.

Because both old and new tasks are affected, this state is likely held above the task/conversation level.

Suggested fix

When the active provider, model, endpoint, or credential context changes:

  1. Clear provider-specific quota and error state.
  2. Recompute global composer availability.
  3. Revalidate the selected provider and model.
  4. Cancel or invalidate pending requests associated with the previous provider.
  5. Enable the Send button when the new provider is valid.
  6. If the new provider cannot be used for the current task, show a specific error instead of leaving the Send button silently disabled.

Suggested regression test

OpenAI provider reaches usage limit
→ Send button becomes disabled
→ switch to a valid third-party provider
→ select a compatible model
→ create a new task
→ Send button becomes enabled
→ message is submitted successfully

The test should also verify that an existing task and a newly created task behave consistently.

Additional evidence available

  • Desktop app version: 26.917.62051
  • Existing and newly created tasks are both affected
  • Third-party provider API is independently verified as valid
  • The issue is reproducible after OpenAI usage is exhausted

What steps can reproduce the bug?

  1. Start Codex desktop version 26.917.62051.
  2. Create or open a task using the OpenAI provider.
  3. Consume the available OpenAI usage until the provider reaches its usage limit.
  4. Confirm that the Send button becomes disabled/greyed out.
  5. Switch the configured provider to a valid third-party provider with a working API key and endpoint.
  6. Select a compatible model from that provider.
  7. Try to send a short message in the existing task.
  8. Create a new task and try to send the same message again.

The bug reproduces in both existing and newly created tasks. The Send button remains disabled after switching providers, even though the third-party API is independently verified to be valid and reachable.

This suggests that provider quota exhaustion leaves a global disabled state in the client. The state is not cleared or recomputed when the active provider changes.

A minimal configuration example is:

# Before: OpenAI provider reaches its usage limit
model_provider = "openai"
model = "<openai-model>"

# After switching: valid third-party provider
model_provider = "third-party"
model = "<third-party-model>"
base_url = "https://api.example.com/v1"
api_key = "<valid-api-key>"

The expected behavior is that the Send button becomes enabled immediately after the valid provider and model are selected, or after starting a new task.

The following information should be attached to the report rather than fabricated:

Session ID: <session-id, if available>
Codex version: 26.917.62051
OpenAI token limit usage: <value shown by the client, if available>
Context window usage: <value shown by the client, if available>
Third-party provider: <provider name>
Third-party model: <model ID>
Operating system: <OS and version>

No code snippet is required to trigger the defect because it is a client-side UI state issue; the configuration above represents the provider transition that triggers it.

What is the expected behavior?

No response

Additional information

No response

Singrun avatar Sep 26 '26 06:09 Singrun

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #47344

Powered by Codex Action

github-actions[bot] avatar Sep 26 '26 06:09 github-actions[bot]

I can reproduce this issue on a newer Windows Codex Desktop build.

Environment:

  • Windows 11 x64
  • Codex Desktop: 26.924.22138
  • ChatGPT Plus
  • Custom providers configured with requires_openai_auth = false

Providers tested:

  • LiteLLM local proxy -> NVIDIA GLM 5.3
  • OpenCode Zen -> Muse Spark 1.3 Contributor Free
  • OpenRouter

My custom provider configuration explicitly uses:

requires_openai_auth = false

The LiteLLM/NVIDIA provider was independently tested through: http://127.0.0.1:4000/v1/responses

and works correctly outside the Codex Desktop quota gate.

Reproduction:

  1. I was logged into Codex Desktop with my ChatGPT Plus account.
  2. My ChatGPT usage initially showed approximately:
    • 5-hour allowance: 100% remaining
    • weekly allowance: 67% remaining
  3. I configured and used a third-party/custom provider.
  4. After some work, Codex Desktop reported that I had reached my usage limit.
  5. I switched back to the OpenAI provider and restarted Codex Desktop.
  6. The usage page then showed approximately:
    • 5-hour allowance: 0% remaining
    • weekly allowance: 37% remaining
  7. I then switched back to a valid third-party provider and restarted the app.
  8. Codex Desktop still reports the usage-limit error and refuses to execute tasks.

The third-party provider itself has available quota and works when called independently.

Expected behavior: A custom provider with requires_openai_auth = false and separate credentials/quota should remain usable after the ChatGPT/OpenAI Codex allowance is exhausted.

Also, switching the active provider should clear/recompute any OpenAI-specific quota state in the Desktop client.

This still reproduces on 26.924.22138, so the regression reported in #48369 appears to still be present in a newer build.

Related: #43333

hgocmenes avatar Sep 27 '26 15:09 hgocmenes

现在codex的桌面版用不了,命令行版本可以用,但是很不方便,希望能尽块修复

yanzhao77 avatar Sep 29 '26 06:09 yanzhao77

Still reproduces on 26.924.22138 (build 11645), macOS arm64, ChatGPT Pro.

Setup: desktop uses a local Responses API router showing a merged model list: ChatGPT subscription rows plus separately billed third-party rows. The third-party route works on its own and in the CLI.

Once the subscription allowance hit zero, the desktop disabled Send everywhere. Switching to a separately billed router model did not re-enable it, including in a new task.

Expected: switching to a provider and model with its own quota re-enables Send. I have not tested 26.928.20755 yet.

Related: #48650, #43333, #47344.

SC-Cyril avatar Sep 30 '26 01:09 SC-Cyril

STill not fix it yet

kotobuki09 avatar Oct 03 '26 13:10 kotobuki09

Still reproducible on a much newer macOS Codex Desktop build (2026-10-09).

Environment

  • macOS, Apple Silicon
  • Codex Desktop 26.1007.21159 (build 20052)
  • OpenCodex 2.81.0
  • Selected model in the Desktop composer: opencode-go/qwen3.8-flash (third-party/custom provider, not an OpenAI subscription model)

Observed

  1. The OpenAI/Codex workspace usage limit has been reached.
  2. The Desktop composer is set to opencode-go/qwen3.8-flash.
  3. Nevertheless, the conversation still shows a usage-limit notice telling me to visit workspace usage settings, and the composer shows "Codex and Work usage exhausted" / "Your workspace quota has been depleted; add credits to continue." The session remains blocked by the workspace quota despite the third-party model selection.

Expected Quota gating for the OpenAI workspace/ChatGPT subscription should not prevent separately routed third-party models from being used. Changing to a custom provider should re-evaluate the quota restriction.

Evidence boundaries The screenshot shows a blue send arrow, so the image alone does not prove the button is visually disabled, nor whether a provider request is dispatched. I do not yet have a network trace or content-free request ID. The confirmed issue in this newer build is that the workspace quota gate remains present even after selecting a third-party model. I have not attached the unredacted screenshot because it includes unrelated private project content; I can supply a redacted one if useful.

Related: #48816, #48650.

1395490241lhj-code avatar Oct 09 '26 20:10 1395490241lhj-code

Also hitting this on Windows — same regression, third-party-only model selection, 2026-10-13.

Environment

  • Codex Desktop 26.1007.21434 (Windows)
  • ChatGPT Plus account
  • Routing: local proxy (OpenCodex 2.83.0) — openai_base_url + model_catalog_json in config.toml, third-party models registered via the catalog

Steps

  1. Exhaust the ChatGPT 5-hour usage window (account at 100%, reset scheduled for a specific time).
  2. The desktop banner appears: "Codex and Work usage exhausted — your rate limit will reset at …".
  3. Switch the composer model to a third-party model (opencode-go/deepseek-flash, also tried opencode-go/muse-spark-1.3-contributor).
  4. Send stays disabled — both in an existing task and in a brand-new task.
  5. The same third-party models keep answering HTTP 200 through the same local proxy endpoint the whole time; only the desktop refuses to dispatch.

Expected A model routed to a separately billed third-party provider should re-enable Send (or at minimum be attempted, surfacing the provider's own result). Composer availability should not be computed from the ChatGPT subscription quota snapshot alone, and switching the active model/provider should recompute it.

Notes

  • Matches the earlier report here (2026-10-09) with opencode-go/qwen3.8-flash on macOS — not platform-specific.
  • The CLI is unaffected, but the desktop app is the primary workflow, so this blocks all desktop work for anyone mixing subscription and third-party models — a documented configuration (model_catalog_json, custom providers).
  • Suggested regression test: exhaust OpenAI usage → switch to a valid third-party provider → create a new task → Send becomes enabled and the message submits.

Please prioritize a fix or share an ETA — this has been reproducible across multiple builds (26.924.x → 26.1007.x) for over two weeks.

Related: #48816, #48650, #47344, #43333

LeslieChen994730 avatar Oct 13 '26 09:10 LeslieChen994730

I'm also seeing this when Dot starts or resumes local Codex tasks on my Linux desktop.

My config.toml uses a custom model_provider with its own available usage, but those tasks immediately return the ChatGPT account usage-limit error. It happens before they can run commands or even check which config/provider they're using. Retrying an existing thread without explicitly overriding the model or reasoning settings gave the same result.

I ran into this with messages sent directly in Desktop too, so it doesn't seem limited to Dot. But the Dot side makes it hard to tell whether the task launcher is actually loading my config.toml or whether it's loading it correctly and then getting blocked by this quota issue anyway.

Can someone clarify whether Dot-created and resumed local tasks inherit the desktop's custom provider settings? If they do, is this the same quota bug? It's currently stopping work across several existing projects.

DevGuyRash avatar Oct 14 '26 16:10 DevGuyRash

Same issue on current version of Windows 10 Codex Desktop, can’t use OpenCode Go models when Codex tokens run out

Tom-Hoinacki avatar Oct 14 '26 23:10 Tom-Hoinacki

Same issue on newest version

ruomiop avatar Oct 16 '26 02:10 ruomiop

Additional Windows regression report (October 18, 2026)

I can reproduce the same quota-gating problem in the Codex/Work desktop workflow on Windows 11.

Scenario: I had a long-running presentation/document task close to completion (editing and exporting a PPTX). The task encountered exceeded retry limit, last status: 429 Too Many Requests, followed by a banner saying "Codex and Work usage exhausted" and prompting me to add workspace credits.

Key regression: In an earlier desktop version I could continue working with a separately configured third-party model after the OpenAI allowance ran out. In the newer version, exhausting the OpenAI/Work quota effectively blocks further message submission/continuation, even though the custom model's own inference quota remains available. The UI still exposes the custom-model selection, but the workflow cannot proceed.

Expected behavior: If a custom provider is eligible to run independently, switching to it should re-evaluate Send/Continue eligibility rather than inheriting the OpenAI quota gate. If this is an intentional Work execution-environment restriction (separate from inference billing), the UI should distinguish those limits explicitly and offer a way to continue through the custom provider in a supported execution mode.

Impact: A near-finished multi-step PPT task is blocked, even though the user has an available external inference route. Repeated retries are not a workable solution.

I can supply a redacted screenshot showing the 429 message, workspace-quota banner, and composer, as well as the exact desktop build number once confirmed. I am not attaching the full screenshot because it contains private project material.

Please investigate the regression in composer/continuation eligibility when OpenAI usage reaches zero while a custom model is configured.

surise64 avatar Oct 17 '26 18:10 surise64

So, are you planning to fix this issue, or will it be added as a new feature?

greathh avatar Oct 20 '26 03:10 greathh

Additional direct reproduction on Windows with Codex Desktop. This may help narrow the cause: the UI changed the selected model name, but the session still reported the native OpenAI provider.

Environment

  • Codex Desktop bundled CLI: codex-cli 0.163.0-alpha.10.2
  • Windows 11 x64
  • ChatGPT sign-in retained
  • Configured custom provider in ~/.codex/config.toml:
    • provider id: magpie
    • base_url = "http://127.0.0.1:3425/v1"
    • wire_api = "responses"
    • provider-specific bearer token/header

Observed

  1. In thread 01a167df-bb00-7ff3-ae7f-b680483946f0, the native OpenAI allowance was exhausted.
  2. The thread showed the usage-exhausted notice.
  3. I switched the model to auto/deepseek-v4.1-flash, which is served by the custom provider.
  4. The desktop recorded the new model name but kept model_provider_id: "openai" in thread_settings_applied.
  5. The custom route was therefore not selected; the session remained subject to the OpenAI quota gate.

Relevant sanitized event sequence:

settings model=gpt-6.1-sol provider=openai
... usage exhausted ...
settings model=auto/deepseek-v4.1-flash provider=openai

No API key, token, auth file, or private conversation content is included here.

Expected

Selecting a model served by an independently configured provider should switch the effective model_provider_id to that provider and evaluate submission availability against that provider's auth/quota state. The UI should not display a custom model while retaining the native OpenAI provider.

This looks related to #48816: the desktop composer gate reads ChatGPT usage independently of the selected route. It may also be related to #46298/#48650.

If the desktop currently requires creating a new task or restarting after changing provider, that limitation should be surfaced explicitly rather than accepting the model selection while retaining the OpenAI provider.

iron-water avatar Oct 23 '26 09:10 iron-water

Still reproducible on Windows Codex Desktop (November 6, 2026).

I'm still experiencing this issue on Windows with the latest Codex Desktop version.

My setup:

  • OS: Windows
  • Client: Codex Desktop
  • API Provider: CLIProxyAPI (CPA), configured through CC Switch
  • Authentication: Official ChatGPT login retained
  • CPA has multiple accounts configured, with available quota on another account

Issue:

Once the currently signed-in ChatGPT account reaches its Codex usage limit, the Desktop app disables the Send button entirely.

Even though my custom API provider (CPA) has another account with available quota, I cannot send any messages.

The request is blocked by the Desktop UI before it even reaches the custom API endpoint.

Expected behavior:

When using a custom API provider with independent quota, exhausting the officially signed-in ChatGPT account's quota should not disable the Send button.

The Desktop app should allow requests to continue through the configured custom provider.

This issue is still present on Windows as of November 6, 2026. Please investigate and fix this regression.

grassfish1122 avatar Nov 06 '26 06:11 grassfish1122

Still reproducible on Windows Codex Desktop as of November 6, 2026.

My setup:

  • Windows 11, ChatGPT Plus
  • Locally hosted Qwen 3.8 27B, Qwen 3.5 27B and Gemma 4
  • Ollama running on a remote RTX 3090 over Tailscale
  • Official Ollama/Codex desktop integration, with LiteLLM also tested

My local models appear in the normal Codex model picker and work correctly until my ChatGPT usage allowance is exhausted.

Once that happens, Codex Desktop blocks message submission entirely, even with a local Qwen model selected. The models remain fully operational through Ollama and the separate CLI.

These models run entirely on my own hardware and consume no OpenAI inference resources, yet the desktop application prevents me from using them.

Expected behaviour: Locally hosted models should remain usable regardless of ChatGPT subscription limits.

Is this a known regression that will be fixed, or an intentional restriction? It's frustrating to have working local AI infrastructure rendered inaccessible by an unrelated subscription limit.

Bomber1000 avatar Nov 06 '26 15:11 Bomber1000

Confirmed on Codex app version 26.1103.41825 (latest version as of November 8, 2026), on macOS, across Apple Silicon Macs with M1, M2 Max, and M4.

After the ChatGPT subscription usage limit is exhausted, switching to a local Ollama model leaves the Send button visibly enabled, but clicking it has no effect. No message is sent and no error is displayed.

This makes the configured local LLM unusable precisely when it is needed as an offline/independent fallback. OpenAI quota exhaustion should not block requests to Ollama.

exrector avatar Nov 07 '26 22:11 exrector

Following up on my November 6 CPA + CC Switch report with current-build evidence: #60545.

On November 10, the installed Windows app is 26.1103.60933 (build 25894), and its updater reports up_to_date. Static review still finds the ChatGPT /wham/usage-derived gate feeding the local composer's "usage-limit" block, without checking the configured custom provider/base_url. The new report includes the exact module names, hashes and code excerpts; it does not claim a newly forced quota-exhaustion test.

Please prioritize this regression and confirm the canonical tracking issue, whether a fix is in progress, and the target release. Retaining desktop sign-in while using an independently authorized inference provider is the workflow that needs to work; removing sign-in also affects desktop capabilities. Please consolidate #60545 into this issue if appropriate, while retaining its current-build evidence.

grassfish1122 avatar Nov 10 '26 07:11 grassfish1122

BTW, not sure if anyone is interested or has already built it for themself, but with some tinkering you can re-enable the button for other models/providers and its still disabled when your openai sub is out of quota.

Wibias avatar Nov 16 '26 10:11 Wibias

BTW, not sure if anyone is interested or has already built it for themself, but with some tinkering you can re-enable the button for other models/providers and its still disabled when your openai sub is out of quota.

feel free to share what tinkering you did to acheive this

Kirkland-Pickles avatar Nov 16 '26 22:11 Kirkland-Pickles

Experimental Codex Desktop fix: Send button blocked after ChatGPT quota exhaustion

Environment: Windows 11, Codex Desktop with OpenCodex routing. Locally patched builds: 26.1111.2228.0 (v3) and 26.1117.3838.0 (v4).

Executive summary

An experimental, separately packaged Codex Desktop patch restored the normal Send button for external OpenCodex models despite exhausted ChatGPT/Codex usage. On 26.1111.2228.0, message submission was confirmed with Grok and OpenRouter. After updating the patch for 26.1117.3838.0, the newer test build was also reported working. This is a local UI fix, not a modification to OpenAI quota or server-side permissions.

Confirmed observations

  • The original Desktop composer blocked Send when ChatGPT/Codex usage was exhausted, including with an external model selected.
  • The patched 26.1111.2228.0 MSIX launched; messages were successfully submitted through the normal composer using Grok and OpenRouter.
  • The patched 26.1117.3838.0 MSIX was subsequently reported to work after installation. Individual external-provider test results for this newer build were not separately documented.
  • Both patches used separate MSIX package identities; the official Store installation was not overwritten.

Exact code changes

26.1111.2228.0 (v3): Two bundled renderer modules contained equivalent composer usage-limit expressions:

  • webview/assets/async/877143.045460eddc.js: rG = rf && "usage-limit";
  • webview/assets/async/283497.67bf9fca70.js: oO = oh && "usage-limit";

The patch conditionally omitted only this UI-disabled reason for eligible external model IDs.

26.1117.3838.0 (v4): The renderer layout changed. The a6kU module produces quota-related UI flags, including usage-limit and reserve-limit. The patch filters only usage-limit for eligible external models at the two native composer consumers:

  • webview/assets/async/602312.7a9f8ef5d1.js
  • webview/assets/async/76344.84ea1532bf.js

In both versions, eligibility is derived at build time from the local OpenCodex model catalog/configuration (recognized provider namespaces and certain exact aliases). It is not a runtime attestation of the actual route. Other composer-disabled reasons remain unchanged; the patch does not force-enable Send.

The modified modules were repacked into app.asar; matching Electron ASAR integrity metadata was updated in a copied executable, and the test app was repackaged as a separately signed MSIX.

Interpretation, limits, and upstream suggestion

Interpretation, not proven root cause: These results are consistent with ChatGPT quota-related UI gating being applied too broadly to independently routed external models. They do not establish that the identified conditions are the only relevant checks.

Still unverified: Live negative test showing native OpenAI models remain blocked, request-level confirmation of actual upstream routing, coverage of other providers/aliases/combos, configuration or login changes, and long-term stability. The patch is build-specific and should not be applied to unknown versions.

Suggested upstream change: Evaluate the composer quota restriction against the effective, authorized provider route. Preserve native OpenAI quota restrictions while allowing independently authorized external routes when no other restriction applies; fail closed for unknown or ambiguous routes.

Safety boundary: Experimental local UI-only patch, not an official build or server-side quota bypass. It does not grant additional OpenAI usage or provider permissions. Static model classification is not an authorization boundary; avoid importing production credentials into an untrusted test build.

Wibias avatar Nov 17 '26 06:11 Wibias