Codex CLI 0.130.0 TUI becomes unstable/crashes on Windows when several subagents run and tool discovery returns repeated 403s
Summary
The Codex CLI TUI crashed or disconnected during a long-running Windows session that had several subagent/session threads active at once. The local logs show many repeated failed to load discoverable tool suggestions: request failed with status 403 Forbidden warnings, websocket stream retries, and missing analytics context warnings while the main thread was waiting on multiple agents. This latest crash does not appear to be the older known taskkill /T /F nested-Codex cleanup issue; targeted searches found no current taskkill / SUCCESS: The process lines in the crash window except our later diagnostic searches.
Environment
- Codex CLI:
codex-cli 0.130.0 - OS: Windows, native PowerShell
- Workspace: private local workspace, path redacted
- Model:
gpt-5.5 - Reasoning effort:
xhigh - Sandbox:
danger-full-access - Approval policy:
never - Relevant config flags:
features.multi_agent = truefeatures.rmcp_client = truefeatures.unified_exec = truefeatures.skills = truefeatures.shell_snapshot = truermcp_client = true
What happened
- A long-running Codex CLI TUI session was doing broad private repository work.
- The run used multiple subagents/session threads. The main session repeatedly called
wait_agentagainst several agent IDs. - While agents were active, many concurrent session threads started logging repeated
403 Forbiddenfailures when loading discoverable tool suggestions. - At least one thread logged a websocket stream disconnect retry.
- Earlier in the same period, several tool calls failed with Windows process creation error
CreateProcessAsUserW failed: 1312. - The user observed another crash and had to reopen/resume the session.
Expected behavior
Codex should degrade gracefully if tool discovery returns 403s or if a child agent/session cannot load optional tool suggestions. A failing subagent should report an error to the main TUI without causing the whole interactive session to disappear, disconnect, or become unrecoverable.
Actual behavior
The session became unstable while multiple agent sessions were active. Logs show repeated warning loops across child/session threads, retries, and missing thread connection context near the crash window.
Evidence from local logs
Times below are UTC from C:\Users\<user>\.codex\log\codex-tui.log.
2026-05-16T15:07:27Z ERROR codex_core::tools::router:
exec_command failed ... CreateProcessAsUserW failed: 1312
This happened for several simultaneous commands such as:
Get-Content phase2_workspace_diff.md
Get-Content MEMORY.md
Get-ChildItem -Name
Get-Content memory_summary.md
Get-ChildItem -Name extensions
Repeated tool-discovery failures then appeared across active threads:
2026-05-16T15:30:50Z WARN codex_core::session::turn:
failed to load discoverable tool suggestions: request failed with status 403 Forbidden: <html>...
A stream retry also appeared:
2026-05-16T15:30:50Z WARN codex_core::session::turn:
stream disconnected - retrying sampling request (1/5 in 212ms)...
The main thread was waiting on multiple agents:
2026-05-16T15:29:04Z ToolCall: wait_agent
targets=[3 redacted agent/session IDs]
timeout_ms=180000
2026-05-16T15:36:17Z ToolCall: wait_agent
targets=[6 redacted agent/session IDs]
timeout_ms=180000
2026-05-16T15:39:24Z ToolCall: wait_agent
targets=[6 redacted agent/session IDs]
timeout_ms=300000
Near the same window, analytics context warnings appeared:
2026-05-16T15:39:47Z WARN codex_analytics::reducer:
dropping tool item analytics event: missing analytics context ... missing_context="thread_connection"
2026-05-16T15:40:01Z WARN codex_analytics::reducer:
dropping compaction analytics event: missing analytics context ... missing_context="thread_connection"
Extra observation
There is a separate older Windows issue in this workspace where nested codex exec --ephemeral reviewer runs could trigger taskkill /T /F cleanup and kill the active shell. This report is probably a different issue because the latest crash window has no direct taskkill evidence.
Privacy note
The full log file is very large and contains private prompts, local paths, and private project content. I can provide a redacted slice around 2026-05-16T15:07:00Z to 2026-05-16T15:40:10Z, plus sanitized config and version output. I would not attach the full raw codex-tui.log publicly without redaction.
Suggested workaround while investigating
- Limit parallel subagents to one or two on Windows.
- Avoid nested
codex execreviewer sessions inside a Codex TUI session. - If the same
403 Forbiddentool-discovery loop starts repeating, stop spawning/waiting on more agents and continue in the main session until the run stabilizes.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reviewed the GitHub Actions potential duplicates:
403symptom, but the reported failure is the CLI/TUI becoming unstable during a multi-subagent run while the main session is waiting on several agents.I think this issue should stay open because it combines a different failure mode:
403 Forbiddenwarnings whilewait_agentis waiting on multiple agents.CreateProcessAsUserW failed: 1312signal earlier in the same session.Related component issues I found while checking:
403 Forbidden/ Cloudflare challenge path.CreateProcessAsUserW failed: 1312.So my read is: related cluster, but not a duplicate of #21899 or #22962.
Same for me but with my local E ddrive
Experiencing the exact same issue:
78,840errors offailed to load discoverable tool suggestionsincodex-tui.logas well as 2.4k
remote installed-plugin cache failuresLatest W11, everything updated.
Each agent turn is unbelievably slow, it's been somewhat recent-ish I'd say.
any update?
If you are able to repro this, please use
/feedbackto upload logs and post the session ID here.