Keep retrying after getting - Selected model is at capacity (Don't process rest of queue)
Open 💬 8 comments Opened Jul 17, 2026 by shaybc
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
Codex Desktop
What feature would you like to see?
when getting the message: "Selected model is at capacity. Please try a different model." no matter what is the reason (real or reconnect known bug) - do not continue to process queue tasks before retrying and finishing the current task.
Additional information
019f70ac-24e9-7971-b7ed-963b00f8a303
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Same problem met.
Same
I encountered the same behavior in Codex Desktop on macOS.
Environment
26.715.21425codex-cli 0.145.0-alpha.18gpt-5.6-solObserved behavior
Selected model is at capacity. Please try a different model.task_completeevents:2026-07-17T15:23:52Zwhile reasoning effort waslow2026-07-17T15:34:10Zwhile reasoning effort wasmediumhighand resubmitting, the next turn completed at2026-07-17T15:37:11Z.This does not appear to mean that a particular reasoning level is broken. Changing the level appears to trigger a fresh admission attempt, which can succeed after the transient capacity failure.
A redacted
codex doctor --summaryrun completed with installation, configuration, authentication, state databases, thread inventory, HTTP reachability, and WebSocket connectivity all healthy. No duplicate app-server process was found. This makes a persistent local installation, authentication, or connectivity failure less likely.The main usability problem is that a transient capacity response terminalizes the active turn instead of retrying with bounded backoff or preserving an explicit resumable state. Since side effects may already have occurred before termination, blindly resubmitting can also risk duplicate work.
same problem please fix
This queue issue a big one because often it will break the prompt with this capacity issue presumably from a load balancer but then it will cascade right into the follow up tab queued prompt even though that prompt is/can be dependent on the previous prompt having finished correctly
for example, if ive prompted implement and merge A which fixes B and then tab queued up "now that B is fixed we can implement C" then "selected model is at capacity" hits, it can immediately halt our finishing of A but then because a load balancer switches us to somewhere where the model is not at capacity, it can from a dirty halfdone feature A begin the confused implementation of C from a partially done conversation.
I traced the CLI/TUI side of this cascade to
ChatWidget::on_server_overloaded_error: after finalizing the failed turn and rendering the warning, it unconditionally callsmaybe_send_next_queued_input(). That means a Tab-queued dependent prompt is submitted before the later failedturn/completednotification can do anything about it.I prepared a minimal regression-tested patch here: https://github.com/relh/codex/pull/1
The regression models a configured active turn, queues a dependent follow-up, sends the terminal structured
ServerOverloadederror and subsequent failed completion, then verifies no newOp::UserTurnis emitted and the queued text remains available for review. The fullcodex-tuisuite passes (3,094 tests; 4 pre-existing skips), along with the required clippy/fmt checks.This is complementary to the same-turn capacity retries in #31058: if retry capacity is exhausted and the turn still terminalizes, the dependent queue should remain paused. Per
docs/contributing.md, I have not opened an unsolicited upstream PR. If a maintainer confirms this narrow approach and invites a contribution, the branch is ready to retarget.