Repository navigation
[BUG] Fresh subagents fail immediately with usage_limit_exceeded before producing output note: actual usage limit still has not exceeded though. #32432
Copy link
Copy link
Open
Labels
CLIIssues related to the Codex CLIIssues related to the Codex CLIbugSomething isn't workingSomething isn't workingrate-limitsIssues related to rate limits, quotas, and token usage reportingIssues related to rate limits, quotas, and token usage reportingsubagentIssues involving subagents or multi-agent featuresIssues involving subagents or multi-agent features
Description
What version of Codex CLI is running?
codex-cli 0.144.1
What subscription do you have?
plus
Which model were you using?
terra ultra as orchestrator and luna ultra as subagent
What platform is your computer?
Linux 6.18.33.2-microsoft-standard-WSL2 x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
WSL2 terminal (TERM=xterm-256color; terminal host was not surfaced)
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1783780046s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.144.1",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "/home/awais/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/home/awais/.codex/app-server-daemon",
"mode": "ephemeral",
"pid file": "/home/awais/.codex/app-server-daemon/app-server.pid (missing)",
"settings": "/home/awais/.codex/app-server-daemon/settings.json (missing)",
"status": "not running",
"update-loop pid file": "/home/awais/.codex/app-server-daemon/app-server-updater.pid (missing)"
},
"remediation": null,
"durationMs": 0
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth file": "/home/awais/.codex/auth.json",
"auth storage mode": "File",
"stored API key": "false",
"stored ChatGPT tokens": "true",
"stored agent identity": "false",
"stored auth mode": "chatgpt"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "/home/awais/.codex",
"config.toml": "/home/awais/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/home/awais/dev/x_automation/assistant_mvp",
"enabled feature flags": "shell_tool, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, remote_plugin, plugin_sharing, image_generation, resize_all_images, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, personality, fast_mode, tui_app_server, remote_compaction_v2, workspace_dependencies",
"feature flag overrides": "none",
"feature flags enabled": "35",
"log dir": "/home/awais/.codex/log",
"mcp servers": "6",
"model": "gpt-5.6-terra",
"model provider": "openai",
"sqlite home": "/home/awais/.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.43.0",
"details": {
".git entry": "directory",
"PATH git #1": "/usr/bin/git",
"PATH git #2": "/bin/git",
"PATH git entries": "2",
"git branch": "feature/003-github-repo-post-profile",
"git build options": "git version 2.43.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh",
"git exec path": "/usr/lib/git-core",
"git version": "git version 2.43.0",
"repo detected": "true",
"repo root": "/home/awais/dev/x_automation/assistant_mvp",
"selected git": "/usr/bin/git"
},
"remediation": null,
"durationMs": 213
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/home/awais/.nvm/versions/node/v22.21.1/bin/codex",
"PATH codex #2": "/mnt/c/Users/awais/AppData/Roaming/npm/codex",
"PATH codex entries": "2",
"current executable": "/home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
"install context": "npm (package /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
"managed by bun": "false",
"managed by npm": "true",
"managed by pnpm": "false",
"managed package root": "/home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex",
"npm update target": "/home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex"
},
"remediation": null,
"durationMs": 334
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "MCP configuration is locally consistent",
"details": {
"configured servers": "6",
"disabled servers": "2",
"stdio servers": "1",
"streamable_http servers": "5"
},
"remediation": null,
"durationMs": 5377
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"proxy env vars": "none"
},
"remediation": null,
"durationMs": 0
},
"network.provider_reachability": {
"id": "network.provider_reachability",
"category": "reachability",
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": {
"ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 404)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 398
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 IPv6, first IPv4",
"auth mode": "chatgpt",
"connect timeout": "15000 ms",
"endpoint": "wss://chatgpt.com/backend-api/<redacted>",
"handshake result": "HTTP 101 Switching Protocols",
"model provider": "openai",
"models etag present": "true",
"provider name": "OpenAI",
"proxy env vars": "none",
"reasoning header": "false",
"server model present": "false",
"supports websockets": "true",
"wire API": "responses"
},
"remediation": null,
"durationMs": 1349
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on linux-x86_64",
"details": {
"commit": "unknown",
"current executable": "/home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
"install method": "npm (package /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
"platform": "linux-x86_64",
"version": "0.144.1"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "/home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path/rg",
"search command readiness": "file exists",
"search provider": "bundled"
},
"remediation": null,
"durationMs": 0
},
"sandbox.helpers": {
"id": "sandbox.helpers",
"category": "sandbox",
"status": "ok",
"summary": "sandbox configuration is readable",
"details": {
"approval policy": "OnRequest",
"codex-linux-sandbox helper": "/home/awais/.codex/tmp/arg0/codex-arg0yA7yxG/codex-linux-sandbox",
"execve wrapper helper": "/home/awais/.codex/tmp/arg0/codex-arg0yA7yxG/codex-execve-wrapper",
"filesystem sandbox": "restricted",
"network sandbox": "restricted"
},
"remediation": null,
"durationMs": 0
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "/home/awais/.codex (dir)",
"active rollout files": "702 files, 471246948 total bytes, 671291 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "/home/awais/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/home/awais/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/home/awais/.codex/log (dir)",
"memories DB": "/home/awais/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"sqlite home": "/home/awais/.codex (dir)",
"state DB": "/home/awais/.codex/state_5.sqlite (file)",
"state DB integrity": "ok"
},
"remediation": null,
"durationMs": 385
},
"state.rollout_db_parity": {
"id": "state.rollout_db_parity",
"category": "threads",
"status": "warning",
"summary": "rollout files and state DB thread inventory differ",
"details": {
"default model provider": "openai",
"rollout DB active files": "702",
"rollout DB active rows": "690",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "0",
"rollout DB archived rows": "0",
"rollout DB duplicate DB paths": "0",
"rollout DB duplicate rollout thread ids": "0",
"rollout DB malformed file names": "0",
"rollout DB missing active rows": "12",
"rollout DB missing active sample": [
"/home/awais/.codex/sessions/2026/03/24/rollout-2026-03-24T15-15-42-019d1f57-d1d2-74b0-b93b-12b22da3fa5c.jsonl",
"/home/awais/.codex/sessions/2026/03/24/rollout-2026-03-24T15-22-23-019d1f5d-eef7-7183-b016-44c9534e4149.jsonl",
"/home/awais/.codex/sessions/2026/03/24/rollout-2026-03-24T15-15-43-019d1f57-d741-7120-b8b5-e22b9a56e63f.jsonl",
"/home/awais/.codex/sessions/2026/03/24/rollout-2026-03-24T15-15-41-019d1f57-cf1a-75c0-86ad-8a22cfedacb9.jsonl",
"/home/awais/.codex/sessions/2026/03/24/rollout-2026-03-24T15-15-45-019d1f57-dd78-7530-b9fc-007fb95b1373.jsonl"
],
"rollout DB missing archived rows": "0",
"rollout DB model providers": "openai=690",
"rollout DB rows": "690",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "cli=629, vscode=42, subagent:thread_spawn=18, exec=1",
"rollout DB stale rows": "0"
},
"issues": [
{
"severity": "warning",
"cause": "rollout files are missing from the state DB",
"measured": "12 active, 0 archived",
"expected": "every rollout file has a matching threads row",
"remedy": null,
"fields": []
}
],
"remediation": null,
"durationMs": 13183
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language C",
"details": {
"EDITOR": "not set",
"LANG": "C.UTF-8",
"VISUAL": "not set",
"os": "Ubuntu 24.4.0 (noble) [64-bit]",
"os language": "C",
"os type": "Ubuntu",
"os version": "24.4.0"
},
"remediation": null,
"durationMs": 14
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"TERM": "xterm-256color",
"WSL_DISTRO_NAME": "present",
"WSL_INTEROP": "present",
"color output": "enabled",
"effective locale": "C.UTF-8",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout is terminal": "true",
"terminal": "unknown",
"terminal size": "120x30"
},
"remediation": null,
"durationMs": 0
},
"terminal.title": {
"id": "terminal.title",
"category": "title",
"status": "ok",
"summary": "terminal title default",
"details": {
"terminal title activity": "true",
"terminal title items": "activity, project-name",
"terminal title project source": "git repo root",
"terminal title project value": "assistant_mvp",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.144.1",
"check for update on startup": "true",
"dismissed version": "0.137.0",
"last checked at": "2026-07-11T04:54:43.160695660Z",
"latest version": "0.144.1",
"latest version status": "current version is not older",
"npm update target": "/home/awais/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex",
"update action": "npm install -g @openai/codex",
"version cache": "/home/awais/.codex/version.json"
},
"remediation": null,
"durationMs": 1982
}
}
}What issue are you seeing?
Summary
Two fresh, read-only analyzer sub-agents failed immediately before producing any output or tool calls. The parent task remained active, but the required independent analysis gate could not proceed. And it says collaborative agent limits have been hit but my usage limit is still over 70 percent remaining. I cross verified the usage limit across codex app, codex cli and codex limit web page.
Error returned by both subagents
You've hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at
9:04 PM.
## Relevant context
- Parent thread: 019f4fde-edb1-7090-ba29-a5beac903b47
- Two separate fresh subagents failed with the same error.
- Neither returned analyzer JSON, tool output, a native session ID, or a native agent ID.
- I requested gpt-5.6-luna with ultra reasoning for each child, but the spawn interface did not expose configuration selectors, so the integration default was used.
- No agents.max_threads override is configured.
- [Attach a screenshot of the Codex usage page / /status here, showing the remaining 5-hour and weekly allowance at the time of failure.]
This resembles #12299 and #28208, but specifically blocks a multi-agent workflow before child agents begin work.
### What steps can reproduce the bug?
Uploaded thread: 019f4fde-edb1-7090-ba29-a5beac903b47
### What is the expected behavior?
If the usage allowance is exhausted, Codex should clearly identify the exhausted quota bucket in `/status` and the usage page.
If the usage page shows remaining allowance, fresh subagents should start successfully, or Codex should return a diagnostic that distinguishes an account quota issue from a subagent/concurrency/runtime failure.
### Additional information
_No response_
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CLIIssues related to the Codex CLIIssues related to the Codex CLIbugSomething isn't workingSomething isn't workingrate-limitsIssues related to rate limits, quotas, and token usage reportingIssues related to rate limits, quotas, and token usage reportingsubagentIssues involving subagents or multi-agent featuresIssues involving subagents or multi-agent features
Activity
github-actions commentedon Jul 11, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Fowlplaychiken commentedon Sep 9, 2026
Additional reproduction in Codex Desktop on Windows, September 9, 2026 (Pro plan; installed stable package OpenAI.Codex 26.903.8094.0, not independently checked against the running About screen): three existing subagents, two Astra High and one Luna Max, terminated with a usage-limit error after doing partial work. The error said to purchase more credits or try again September 11, 2026 at 3:03 PM. Immediately checking the account usage tool showed the codex primary window at 59% used (41% remaining), windowDurationMins=10080, secondary=null, rateLimitReachedType=null, and spendControlReached=false. The parent turn could still respond. No usage reset was consumed. This is an observed mismatch, not a claim about which backend quota caused it, and reproduction is not known to be deterministic. Expected: identify the exhausted quota and show it consistently in usage reporting, or do not terminate helpers with a quota error when the applicable allowance remains. No private project prompts, credentials, or logs are included.
awasali14 commentedon Sep 9, 2026
@Fowlplaychiken your issue might be because of recent codex usage drain issue where multiple users are reporting sudden drainage and sudden reset. Check r/codex and ask grok about related posts on X.
soham commentedon Oct 12, 2026
Update: explained by a manual usage-limit reset. The account holder confirmed manually resetting the limits on October 12, 2026 at 11:42 AM GMT+05:30 (06:12 UTC, reported to minute precision), after exhaustion. The errors occurred before that reset, so this is not a confirmed reproduction of the quota mismatch reported in this issue. The delayed presentation of earlier subagent failures was confusing.
+1 for clearer subagent quota diagnostics. I encountered a similar-looking symptom on macOS arm64, with Codex CLI 0.162.1 installed and 0.162.1 recorded in the affected child-session metadata. However, checking timestamped local telemetry revealed an important qualification: this is not a confirmed reproduction of subagents being rejected while the same allowance still had capacity.
Two existing subagents ended with
usage_limit_exceeded; the parent turn also ended with that error. The message directed me to buy credits or retry on October 18. The subsequent dashboard showed 95% remaining, which initially looked contradictory. The recorded chronology on October 12, 2026 (UTC) was:The failure notifications therefore surfaced alongside a refreshed allowance, even though the failures occurred earlier. The account holder subsequently confirmed manually using an available usage-limit reset after exhaustion. That explains the changed allowance window and the later 95% remaining reading; this case provides no evidence of a separate subagent quota or incorrect enforcement. It also does not rule out the simultaneous mismatch reported by others here.
It would help if subagent failure messages included the failure occurrence time, exhausted quota bucket/window, and applicable reset time, and distinguished an earlier failure delivered after resume from a newly rejected request. No private prompts, credentials, account identifiers, or raw session logs are attached.