Quick Answer
"Request timed out" in Codex is almost never an OpenAI outage — it is a network-path problem. The most common causes, in order, are: a missing terminal proxy, the macOS sandbox silently blocking network access, MCP servers that exceed their startup timeout, and DNS/SNI blocking on restricted networks. The single most reliable fix in 2026 is to point Codex at a stable, globally reachable endpoint like TeamoRouter, which eliminates DNS pollution, proxy conflicts, and endpoint throttling in one step. Below are seven fixes that actually work, ranked from simplest to most thorough.
No card at all? You can also top up with USDT, USDC or ETH: click Pay with crypto in the top-up dialog and send it from Binance, OKX or any wallet. The minimum is $5 and no browser extension is needed. Step by step: Pay for Claude and GPT APIs with crypto (USDT).
Why Codex Requests Time Out
Codex CLI sends every request to https://api.openai.com/v1/responses by default. When that request stalls, you see one of a handful of error strings:
| Error Message | Most Likely Cause |
|---|---|
Error: Connection timeout after 30000ms |
First API request blocked at the network layer |
fetch failed: request to https://api.openai.com/v1/responses failed |
DNS, proxy, or SNI problem |
ETIMEDOUT |
TCP connection never completes |
read ECONNRESET |
Connection reset mid-session |
request timed out |
MCP server or streaming call stalled |
Network Error |
Desktop App / Web client |
These share one trait: the browser on the same machine often works fine while the terminal does not. That asymmetry is the key diagnostic clue — the browser reads system proxy settings, but most CLI tools do not. Fix the terminal's network path and you fix the timeout.
How to Diagnose Which Layer Is Failing
Before trying fixes blindly, run a 60-second diagnosis to locate the failing layer. The answer tells you which fix applies:
| Test | Command | Result Means |
|---|---|---|
| Can you resolve DNS? | ping -c 3 api.openai.com |
Persistent DNS failures → Fix 6 |
| Can you reach the API? | curl -I --max-time 20 https://api.openai.com/v1/models |
Fast 401 → network is fine, problem is elsewhere |
| Does the proxy work? | curl -x http://127.0.0.1:7890 -I --max-time 20 https://api.openai.com/v1/models |
401 → proxy works; timeout → proxy node is bad |
| Is it a shell command? | Run ls inside a Codex sandbox session |
Hangs → Fix 7 |
| Is it an MCP server? | Watch which process spawns before the timeout | MCP startup → Fix 3 |
| Is it mid-stream? | Note whether the timeout happens after minutes of use | Expired auth → Fix 5 |
If the curl test returns a fast 401, your network path to OpenAI is healthy and the timeout is coming from a sandbox, MCP, auth, or shell-initialization layer. If curl hangs, the problem is DNS, proxy, or SNI — jump to the network fixes.
Fix 1: Configure the Terminal Proxy
If your browser reaches OpenAI but Codex times out, the terminal is almost certainly bypassing your proxy. Codex only honors these environment variables — it does not read system proxy settings, PAC files, or WPAD auto-discovery:
export HTTPS_PROXY="http://127.0.0.1:7890"
export HTTP_PROXY="http://127.0.0.1:7890"
export ALL_PROXY="socks5://127.0.0.1:7890"
export NO_PROXY="localhost,127.0.0.1"
Add these to ~/.zshrc (macOS/Linux) or set them system-wide in Windows, then open a new terminal. Verify the path before blaming Codex:
curl -I --max-time 20 https://api.openai.com/v1/models
A fast 401 response means the proxy path works and you can move on. Anything else means the proxy node itself is the bottleneck.
Fix 2: The macOS Sandbox Is Silently Blocking Network Access
On macOS, setting network_access = true in ~/.codex/config.toml is silently ignored by the seatbelt sandbox, which unconditionally sets CODEX_SANDBOX_NETWORK_DISABLED=1. Outbound calls from sandboxed shell commands then fail with connection timeouts, even though the API itself is reachable.
The fix is to run Codex with full network access at the CLI level:
codex --sandbox danger-full-access "your prompt"
For convenience, add an alias so every session gets network access:
alias codex='CODEX_SANDBOX_NETWORK_DISABLED=0 codex --sandbox danger-full-access'
Note that setting sandbox_mode = "danger-full-access" in config.toml alone is not sufficient — the CLI flag is what actually takes effect. If you run many shell commands inside Codex (builds, tests, git push), this fix alone usually resolves most "request timed out" errors.
Fix 3: Raise the MCP Server Startup Timeout
MCP servers (Context7, Playwright, Dart, Firebase, and similar) frequently produce request timed out on Windows because Codex spawns them directly without going through cmd.exe. Two things go wrong: executables on PATH are not found, and slow first-time startup exceeds the default timeout.
Wrap MCP commands in cmd.exe /c and raise the timeout in ~/.codex/config.toml:
[mcp_servers.context7]
command = "cmd"
args = ["/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "your-key"]
env = { SystemRoot = "C:\\Windows" }
startup_timeout_ms = 30_000
A startup_timeout_ms of 20,000 to 60,000 ms is reasonable — first npx invocation downloads the package and can easily blow past the default. If a remote MCP server keeps timing out, install mcp-remote globally (npm install -g mcp-remote) and point the server at a remote URL instead.
Fix 4: Forward Your Proxy Through SSH (Remote Hosts)
When Codex runs on a remote machine through VSCode Remote SSH, it uses the remote host's network. If that host cannot reach api.openai.com, requests time out even though your local machine is fine.
Forward your local proxy to the remote box in ~/.ssh/config:
Host myserver
RemoteForward 10808 127.0.0.1:10808
Then export the proxy on the remote host:
export HTTPS_PROXY=http://127.0.0.1:10808
export HTTP_PROXY=http://127.0.0.1:10808
Verify from the remote host with curl -I --max-time 20 -x http://127.0.0.1:10808 https://api.openai.com/v1/models — a quick 401 confirms the tunnel works. Also set http.proxy / https.proxy in VSCode's Remote Settings (JSON) so editor-integrated calls use the same path.
Fix 5: Expired or Revoked Authentication
A mid-stream request timed out (rather than one at startup) is sometimes an authentication problem in disguise. Codex 0.41-era releases had a known issue where expired or revoked refresh tokens caused streaming timeouts. If a timeout appears consistently after a few minutes of use, and your network path is clean, refresh the session:
codex logout
codex login
If you authenticate with an API Key instead of ChatGPT login, confirm the key is valid and has balance — a revoked key can surface as a hang before the actual 401 is reported. If OpenAI says you're out of credits, see how to fix OpenAI's "You have no credits remaining" error.
Fix 6: Fix DNS and SNI Blocking on Restricted Networks
If you are in a region with a restricted internet connection, the failure chain is usually deeper than a proxy issue:
- DNS pollution —
api.openai.comresolves to a spoofed or dead IP. - SNI blocking — the TLS handshake probe triggers a connection reset even with correct DNS.
- IP range throttling — OpenAI's server ranges are rate-limited or blocked during peak hours.
A VPN or proxy helps only if the whole traffic path is covered, which is why "the browser works but Codex doesn't" is so common. When you cannot reliably control DNS and SNI per process, the robust fix is to change the endpoint Codex talks to. A gateway like TeamoRouter hosts an OpenAI-compatible endpoint on domains that are not blocked, so DNS pollution and SNI interference disappear at the source. Point Codex at it in ~/.codex/config.toml and set your key — no proxy at all (see the Codex install guide):
# ~/.codex/config.toml
model_provider = "teamorouter"
model = "gpt-6.1-sol"
[model_providers.teamorouter]
name = "TeamoRouter"
base_url = "https://api.teamorouter.ai/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"
export OPENAI_API_KEY="your-key"
codex
Fix 7: Rule Out Sandboxed Shell Command Timeouts
Sometimes the "timeout" is not the API at all — it is a shell command running inside the Codex sandbox that hangs. If you see exit code 124 (GNU timeout) for trivial commands like ls or git status, your shell initialization is the culprit. Known triggers include pyenv versions before 2.6.16, which hang during rehash inside the sandbox.
Fix by updating pyenv, passing a higher timeout_ms to shell tool calls, or running the session with --yolo when you trust the task. If a sandboxed run fails before any OpenAI response exists, treat it as an execution-environment problem, not an API problem.
"workspace routing discovery timed out"
Depending on where it happens, the full text looks like one of these:
Sign-in failed: workspace routing discovery timed out(desktop app or IDE extension)Error: account/read failed during TUI bootstrap: account/read failed: workspace routing discovery timed out (code -32603)(when the CLI starts)Error running remote compact task: workspace routing discovery timed out(in the middle of a long chat)
What it means. If you sign in with ChatGPT and have a workspace selected, Codex first asks the ChatGPT backend (accounts/check) which backend and data-residency routing that workspace needs. Model requests wait for that answer, including WebSocket turns and remote compaction (when OpenAI's backend shrinks a long conversation). The whole lookup has a 15-second limit, and this error means the limit ran out. Codex caches the result, but a token refresh clears the cache, so the lookup can also run mid-session. Signing in with an API key skips this step.
What to do.
- Retry. Codex doesn't cache a failed lookup, so the next request tries again. If compaction fails before a turn starts, Codex keeps your prompt, so you can send it again.
- Check connectivity. Run
codex doctorto check your login and whether Codex can reachchatgpt.com. - If you use a proxy: since September 2026, Codex retries this lookup through the system proxy after a connection failure or timeout. This is the
system_proxy_fallbackfeature, which is on by default. In one macOS report, launching the app withHTTPS_PROXY/HTTP_PROXYset (andNO_PROXY=localhost,127.0.0.1,::1) fixed timeouts that the system proxy alone didn't. Behind a corporate TLS-inspecting proxy, setCODEX_CA_CERTIFICATEto your root CA's PEM file. - Update Codex, and include the version when you report the problem.
Still unknown: dozens of reports opened since late September 2026 are still open. Most come from the Windows desktop app, with some from macOS, WSL and Linux. OpenAI hasn't published a root cause for cases where the error keeps coming back.
Sources: app-server README: Selected workspace routing · 15-second timeout in workspace_routing.rs · PR #46562: system proxy fallback for login and startup requests
"FrameArrived timed out"
The full text is FrameArrived timed out: timed out waiting on channel. It often appears next to window capture timed out: timed out waiting on channel. After it, coordinate clicks can fail with coordinate input geometry is unavailable.
What it means. It comes from Computer Use on Windows in the ChatGPT/Codex desktop app. FrameArrived is the Windows Graphics Capture event that delivers a captured frame of a window. The Computer Use capture helper didn't get a usable frame of the target window in time. Listing windows and reading their accessibility text usually still work. Only screenshots fail, and coordinate clicks fail because they rely on those screenshots.
Who gets it. Almost every report comes from Windows 10 (mostly 22H2, build 19045). It happens across many apps, from Notepad to Photoshop. Restarting the app or Windows, or reinstalling, doesn't help. Community debugging in issue #35446 points to the helper blocking while it converts the frame inside the FrameArrived callback. OpenAI hasn't confirmed that or shipped a fix as of October 26, 2026.
What to do.
- Keep the target app visible on the active, unlocked desktop. Windows Computer Use only works in the foreground.
- Update the desktop app and the Computer Use plugin, then send
/feedbackwith the chat ID. - One user saw screenshots start working after upgrading from Windows 10 to Windows 11 25H2. The plugin was also updated between their tests, so the upgrade alone isn't proven to be the fix.
- For web apps, use the built-in browser or the browser extension instead of Computer Use.
Sources: issue #35446 (FrameArrived deadlock on Windows 10) · issue #49383 · Computer Use docs
"js execution timed out; kernel reset, rerun your request"
What it means. The desktop app's built-in Browser, Chrome/Edge extension control and Computer Use all run through a JavaScript runtime. Reports show it as tools like node_repl / cua_repl. This error means one JavaScript call ran past its time limit, so Codex killed and restarted the runtime (the "kernel"). Anything set up in earlier calls, such as browser or tab handles and variables, is lost and must be set up again. Open tabs may survive.
Typical pattern. Listing tabs works, but anything that touches the page hangs for about 30 seconds and then fails with this message: navigation, reading the DOM, screenshots. Some Windows installs time out even on trivial code, which means the runtime itself isn't responding.
What to do.
-
Rerun once. If it keeps failing, ask Codex to do one page action per step instead of chaining several into one call.
-
Work through OpenAI's browser troubleshooting list:
- Check that the site isn't on the blocklist in Settings.
- Update the app, and any other copies of it you have installed.
- Restart the browser.
- Confirm the browser shows Manage under Settings > Computer Use.
- Use the browser profile where the extension is installed.
- Start a new chat.
- Restart the app, and reinstall the extension if it still fails.
- If none of that works, send
/feedback.
-
If you use a local proxy (community workaround, not official): in issue #39766, every action on a remote page took about 21 s on Windows. The cause was that the browser-control process didn't inherit the proxy environment variables. Forwarding them in a trusted project's
.codex/config.tomlfixed it after a full app restart:[mcp_servers.node_repl] env_vars = ["NODE_USE_ENV_PROXY", "HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY"]This only forwards those variables; they must already be set in the environment the app starts from.
Still unknown: there's no single confirmed cause. Reports point to different layers (extension connection, page-access checks, proxy), and OpenAI hasn't published a fix.
Sources: issue #39766 (30 s deadline, ~21 s page actions) · issue #42013 · Browser extension troubleshooting
The Fastest Path: Skip the Firefighting
Individually, these fixes each solve one layer of the stack: proxy, sandbox, MCP, SSH, auth, DNS. But many users hit two or three layers at once — a corporate proxy AND a macOS sandbox AND a flaky VPN node. Troubleshooting them one by one is how an afternoon disappears.
That is why the pragmatic 2026 fix is to remove the fragile layers instead of debugging them. TeamoRouter gives Codex a single OpenAI-compatible endpoint that is directly reachable from most networks, with no proxy required and no sandbox-network gymnastics. The setup is one config file and one environment variable:
- Sign up at TeamoRouter and copy your API Key
- Configure the provider in
~/.codex/config.tomland setOPENAI_API_KEY(see the Codex install guide) - Run
codex— if it was a network-layer timeout, it now works
FAQ
Why does the browser reach OpenAI but Codex CLI times out?
The browser reads system proxy settings (or a VPN extension), while CLI tools ignore system settings entirely and rely on HTTPS_PROXY / HTTP_PROXY environment variables. Set those, or switch Codex to a directly reachable endpoint.
Is "request timed out" caused by OpenAI being down?
Almost never. Timeouts are overwhelmingly network-path issues — proxies, sandboxes, MCP startup, or DNS/SNI interference. OpenAI's API returns structured errors (401, 429, 5xx) when it is reachable; a hang or ETIMEDOUT means the request never completed the round trip. If you get a 403 saying your country isn't supported, see OpenAI's "Country, region, or territory not supported" error and fixes.
Does TeamoRouter require a proxy or VPN?
No. TeamoRouter's endpoint is directly reachable from most networks, so you configure the base URL once and remove the proxy layer entirely.
Why does my Codex Desktop App time out but the CLI works?
The Desktop App uses the system network configuration, which is a different path from the terminal's environment variables. Check system proxy settings first, then point both at the gateway: the Desktop App reads the same ~/.codex/config.toml provider settings as the CLI (see the Codex Desktop setup guide), which gives both surfaces the same stable path.
Get Started
The simplest fix is switching the endpoint:
- Sign up for TeamoRouter and get an API Key
- Configure the provider in
~/.codex/config.tomland setOPENAI_API_KEY(see the Codex install guide) - Run
curlto verify connectivity — expect a fast non-000 status code, then startcodex
You can also top up your TeamoRouter balance with USDT: click Pay with crypto in the top-up dialog and pay with USDT, USDC or ETH from Binance, OKX or any exchange app — no browser wallet needed, and the checkout shows which networks your amount supports (BEP20 works from $5). See how to pay with USDT.
Access Codex, Claude Code, and Gemini CLI stably through TeamoRouter.