You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Pasting a long, multi-line text into the Codex TUI causes the entire UI to freeze — no keyboard
input is accepted and there is no spinner. The process stays alive (sleeping, 0% CPU), and logs_2.sqlite shows the main thread blocked in a tight tokio-tungstenite WebSocket read loop
hitting WouldBlock with no timeout. A forced SIGINT is required to recover.
Paste a long, multi-line text (a multi-KB markdown document with many \n) into the prompt.
Press Enter.
TUI freezes completely; no further input is accepted.
Expected: Send the request with a timeout, or reject oversized/malformed input with a clear
error. Actual: TUI hangs indefinitely; the main thread is blocked and never recovers on its own.
Diagnostic evidence captured
Process state: Sl+ (sleeping), CPU 0% — blocked, not computing.
Network to OpenAI is reachable: api.openai.com → 401, chatgpt.com → 403 (normal auth
responses, not a network outage).
Sending SIGINT flips state Sl+ → R+ (brief wake) then the TUI exits, leaving the terminal in
a dirty state (raw mode not restored; subsequent keystrokes render as garbage like u;1:3u...).
Not MCP-related: codex mcp list → "No MCP servers configured".
Not sandbox-related: sandbox_mode = workspace-write.
Workaround
Do not paste long text directly. Save it to a file and reference it by path so the agent reads
it via a tool call instead of sending the whole payload over WebSocket.
Suggested fixes
Add a timeout on the WebSocket poll_next / read path — fail-fast instead of blocking
forever.
Summary
Pasting a long, multi-line text into the Codex TUI causes the entire UI to freeze — no keyboard
input is accepted and there is no spinner. The process stays alive (sleeping, 0% CPU), and
logs_2.sqliteshows the main thread blocked in a tighttokio-tungsteniteWebSocket read loophitting
WouldBlockwith no timeout. A forced SIGINT is required to recover.Environment
~/.codex/auth.json)gpt-5.5,model_reasoning_effort = "high"approval_policy = "never",sandbox_mode = "workspace-write"codex resume --last --dangerously-bypass-approvals-and-sandboxReproduction
\n) into the prompt.Expected: Send the request with a timeout, or reject oversized/malformed input with a clear
error.
Actual: TUI hangs indefinitely; the main thread is blocked and never recovers on its own.
Diagnostic evidence captured
Sl+(sleeping), CPU 0% — blocked, not computing.api.openai.com→ 401,chatgpt.com→ 403 (normal authresponses, not a network outage).
~/.codex/logs_2.sqlitetail shows a tight loop:Sl+ → R+(brief wake) then the TUI exits, leaving the terminal ina dirty state (raw mode not restored; subsequent keystrokes render as garbage like
u;1:3u...).codex mcp list→ "No MCP servers configured".sandbox_mode = workspace-write.Root cause hypothesis
Codex App hang by pasting “\n” character #26326).
transport=autoprefers WebSocket (responses_websocket); aserver-side ~300s idle timeout (Codex CLI hangs on Ubuntu during normal prompts #16168) leaves the connection half-dead, and the WebSocket read
loop (
poll_next) has no reasonable timeout, so the main thread blocks indefinitely. Samegpt-5.5+ ChatGPT-auth + WebSocket pattern as macOS local Codex clients hang after sending prompts #13715.Workaround
Do not paste long text directly. Save it to a file and reference it by path so the agent reads
it via a tool call instead of sending the whole payload over WebSocket.
Suggested fixes
poll_next/ read path — fail-fast instead of blockingforever.
falling back).
mode.
Related issues: #26326, #1451, #16168, #13715, #13710, #22634, #17003