openai / openai/codex

The issue occurred while using Codex. Recently, I often see the prompt "Selected model is at capacity. Please try a different model."

Open
#46,152 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI connectivity rate-limits
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

0.154.0

What subscription do you have?

plus

Which model were you using?

gpt-6 astra

What platform is your computer?

masoc

What terminal emulator and version are you using (if applicable)?

iTerm2

Codex doctor report
Codex Doctor v0.154.0 · macos-aarch64

Notes
   ⚠ rollouts     146 active files · 1.17 GB on disk
   ⚠ threads      2 issues - rollout files are missing from the state DB; duplicate thread inventory entries found
─────────────────────────────────────────────────────────────

Environment
  ✓ system       zh-Hans-CN
      os                       Mac OS 26.6.2 [64-bit]
      OS language              zh-Hans-CN
      LANG                     zh_CN.UTF-8
      VISUAL                   not set
      EDITOR                   not set
      PAGER                    less
      LESS                     -R
  ✓ disk         sufficient free disk space (774.8 GiB)
      warning threshold        5.0 GiB
      failure threshold        1.0 GiB
      CODEX_HOME available     774.8 GiB
      worktree available       774.8 GiB
  ✓ security     no supported endpoint protection detected
      endpoint products        none detected
  ✓ runtime      npm (package /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin, bin /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin, resources /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-resources, path /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path)
      version                  0.154.0
      install method           npm (package /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin, bin /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin, resources /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-resources, path /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path)
      commit                   unknown
      executable               ~/.nvm/versions/node/v22…-apple-darwin/bin/codex
  ✓ install      consistent
      context                  npm (package /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin, bin /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/bin, resources /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-resources, path /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path)
      managed by               npm: yes · bun: no · pnpm: no · Vite+: no · package root /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex
      PATH entries (1)         ~/.nvm/versions/node/v22.23.1/bin/codex
      npm update target        not inspected (PATH helpers are not executed)
  ✓ search       file exists (bundled, /Users/royou/.nvm/versions/node/v22.23.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex-path/rg)
      search command           ~/.nvm/versions/node/v22…le-darwin/codex-path/rg
      search provider          bundled
      search command readiness file exists
  ✓ git          git executable found; execution not verified
      selected git             /usr/bin/git
      repo detected            false
      PATH entries (1)         /usr/bin/git
      git execution            not inspected (PATH helpers are not executed)
  ✓ terminal     iTerm2 3.6.11
      terminal                 iTerm2
      TERM_PROGRAM             iTerm.app
      terminal version         3.6.11
      stdin is terminal        true
      stdout is terminal       true
      stderr is terminal       true
      terminal size            272x63
      color output             enabled
      COLORTERM                truecolor
      COLORFGBG                0;15
      TERMINFO_DIRS entry      /Applications/iTerm.app/…ents/Resources/terminfo (dir)
      TERMINFO_DIRS entry      /usr/share/terminfo (dir)
      effective locale         zh_CN.UTF-8
  ✓ title        default · project royou
      title source             default
      title items              activity, project-name
      activity item            true
      project source           cwd
      project value            royou
  ✓ state        databases healthy
      CODEX_HOME               ~/.codex (dir)
      log dir                  ~/.codex/log (missing)
      sqlite home              ~/.codex (dir)
      state DB                 ~/.codex/state_5.sqlite (file) · integrity ok
      log DB                   ~/.codex/logs_2.sqlite (file) · integrity ok
      goals DB                 ~/.codex/goals_1.sqlite (file) · integrity ok
      memories DB              ~/.codex/memories_1.sqlite (file) · integrity ok
      active rollouts          146 files · 1.17 GB (avg 8.20 MB)
      archived rollouts        12 files · 37.48 MB (avg 3.12 MB)
      queue DB                 ~/.codex/queue_1.sqlite (file)
      queue DB integrity       ok
      thread history DB        ~/.codex/thread_history_1.sqlite (file)
      thread history DB integrity ok
  ⚠ threads      2 issues - rollout files are missing from the state DB; duplicate thread inventory entries found
      default model provider   openai
      rollout DB active files  146
      rollout DB archived files 12
      rollout DB scan errors   0
      rollout DB malformed file names 0
      rollout DB scan cap reached false
      rollout DB rows          136
      rollout DB active rows   124
      rollout DB archived rows 12
      rollout DB missing active rows 22
      rollout DB missing archived rows 0
      rollout DB stale rows    0
      rollout DB archive mismatches 0
      rollout DB duplicate rollout thread ids 7
      rollout DB duplicate DB paths 0
      rollout DB model providers openai=136
      rollout DB sources       subagent:other=61, vscode=61, subagent:thread_spawn=12, cli=2
      rollout DB missing active sample ~/.codex/sessions/2026/0…a2f2-8f8891e4c539.jsonl
      rollout DB missing active sample ~/.codex/sessions/2026/0…8493-50c4da11b47d.jsonl
      rollout DB missing active sample ~/.codex/sessions/2026/0…90bd-e9f89e9b3a46.jsonl
      rollout DB missing active sample ~/.codex/sessions/2026/0…a125-e01a8f8580cf.jsonl
      rollout DB missing active sample ~/.codex/sessions/2026/0…8da0-118c65827755.jsonl
      rollout DB duplicate rollout thread id sample 01a047a8-fb7e-7d23-a2f2-8f8891e4c539
      rollout DB duplicate rollout thread id sample 01a05bb1-5fb6-7640-a671-0428afa5094e
      rollout DB duplicate rollout thread id sample 01a06007-5863-7353-80f1-8480dd22ec51
      rollout DB duplicate rollout thread id sample 01a07ade-f92c-7943-b137-26c7c9396af6
      rollout DB duplicate rollout thread id sample 01a0a4f1-74a2-77e3-a125-e01a8f8580cf
    → Attach the doctor report to a bug report so support can inspect samples.

Configuration
  ✓ config       loaded
      model                    gpt-5.6-terra · openai
      cwd                      ~
      config.toml              ~/.codex/config.toml
      config.toml parse        ok
      MCP servers              2
      feature flags            48 enabled · 0 overridden (full list with --all)
      configuration scope      invocation config, including cloud-managed policy
      active thread overrides  not inspected
      configuration load ms    4
  ✓ auth         auth is configured
      auth storage mode        File
      auth file                ~/.codex/auth.json
      stored auth mode         chatgpt
      stored API key           false
      stored ChatGPT tokens    true
      stored agent identity    false
  ✓ mcp          2 server (2 stdio) · 1 disabled
      configured servers       2
      disabled servers         1
      stdio servers            2
  ✓ sandbox      restricted fs + restricted network · approval OnRequest
      approval policy          OnRequest
      filesystem sandbox       restricted
      denied-read rules        0
      denied-read glob rules   0
      glob scan max depth      unbounded
      managed filesystem source none
      network sandbox          restricted
      linux helper             none
      execve wrapper helper    ~/.codex/tmp/arg0/codex-…TX/codex-execve-wrapper

Desktop App
  ✓ desktop      the desktop application is installed
      version                  26.911.61220
      running                  true
      log directory            $HOME/Library/Logs/com.openai.codex
  ✓ desktop      the desktop app-server initialized successfully
  ✓ desktop      the desktop application passed available macos security assessments
      gatekeeper               accepted

Updates
  ✓ updates      update configuration is locally consistent
      startup update check     true
      update action            npm install -g @openai/codex
      version cache            ~/.codex/version.json
      cached latest version    0.154.0
      last checked at          2026-09-17 07:29 UTC
      npm update target        not inspected (PATH helpers are not executed)
      latest version           0.154.0
      latest version status    current version is not older

Connectivity
  ✓ network      no proxy env vars
      proxy env vars           none
      system proxy             manual
      respect system proxy     disabled
      managed proxy            not configured
  ✓ websocket    connected (HTTP 101 Switching Protocols) · 15s timeout
      model provider           openai
      provider name            OpenAI
      wire API                 responses
      supports websockets      true
      proxy env vars           none
      connect timeout          15000 ms
      auth mode                chatgpt
      endpoint                 wss://chatgpt.com/backend-api/<redacted>
      DNS                      1 IPv4, 0 IPv6, first IPv4
      handshake result         HTTP 101 Switching Protocols
      reasoning header         false
      server model present     false
  ✓ reachability active provider endpoints are reachable over HTTP
      reachability mode        ChatGPT auth
      ChatGPT inference URL    https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)
      desktop assets CDN       https://chatgpt.com/backend-api/<redacted> reachable (HTTP 200)

Background Server
  ○ app-server   not running (ephemeral mode)
      daemon state dir         ~/.codex/app-server-daemon
      settings                 ~/.codex/app-server-daemon/settings.json (missing)
      pid file                 ~/.codex/app-server-daemon/app-server.pid (missing)
      update-loop pid file     ~/.codex/app-server-daem…/app-server-updater.pid (missing)
      control socket           ~/.codex/app-server-cont…app-server-control.sock
      status                   not running
      mode                     ephemeral

─────────────────────────────────────────────────────────────
21 ok · 1 idle · 2 notes · 1 warn · 0 fail degraded

--summary compact output   --all expand truncated lists
--json redacted report
What issue are you seeing?

Falling back from WebSockets to HTTPS transport. stream disconnected before completion: An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists. Please include the
request ID 55190452-bb84-447c-9511-28c1c664bd99 in your message.

What steps can reproduce the bug?

Uploaded thread: 01a0ae4c-68f0-7033-bb96-02bccfe7269c

What is the expected behavior?

The issue occurred while using Codex. Recently, I often see the prompt "Selected model is at capacity. Please try a different model."

Additional information

The issue occurred while using Codex. Recently, I often see the prompt "Selected model is at capacity. Please try a different model."

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with Codex CLI 0.154.0, the gpt-6 astra model, and the supplied WebSocket-to-HTTPS fallback message. Inspect the transport and stream-disconnect handling, using the Codex doctor report to compare connectivity and configuration. Done means the capacity or disconnect behavior is explained and corrected, with a regression test for the observed failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.