Troubleshooting
Can't connect to Codex? Troubleshooting checklist
Work through connection failures in Codex, Claude Code and Cursor — run the check script, update the subscription, TUN vs HTTPS_PROXY, node choice, DNS and IPv6.
Updated 2026-10-11
Seeing stream disconnected before completion, error sending request, timeouts, "region not supported" or a sign-in that never finishes? Work through these steps in order — most problems are solved by step 3.
1. Run the check script
In the terminal where the problem happens:
curl -fsSL https://app.keepkite.com/check.sh | bash
It checks the terminal's proxy variables, your exit network, and whether the Codex and Claude endpoints are reachable. Attach the full output when you open a ticket — it speeds things up a lot.
To read it first:
curl -fsSL https://app.keepkite.com/check.sh -o keepkite-check.sh && less keepkite-check.sh
bash keepkite-check.sh
2. Make sure the subscription is valid and up to date
- In the console, check that your plan hasn't expired and you still have traffic.
- In the proxy client, update the subscription manually — the node list changes as routes are adjusted.
- If you reset your subscription link, the old one stops working; import the new one.
3. Make sure traffic really goes through the proxy
The most common cause: the client is running, but Codex's requests never reach it.
TUN mode: the TUN switch is on and the mode is Rule or Global. On macOS / Windows, TUN needs a helper service the first time; if you didn't authorize it, the switch turns itself off.
Environment variables: in the same terminal that runs Codex:
env | grep -i _proxy
You should see HTTPS_PROXY=http://127.0.0.1:<port>. Note:
- The port must match the client's mixed port (Clash Verge Rev defaults to
7897; other clients often use7890). - Use the
http://scheme; Claude Code doesn't supportsocks5://. - A new terminal doesn't inherit variables you
exported in another one; put them in~/.zshrc/~/.bashrc. - IDEs (VS Code, Cursor) launched from the Dock or Start menu don't read your shell profile. Inside IDEs, use TUN or the editor's own proxy settings.
4. Switch nodes
Open the status page:
- Pick a node that is online and shows Codex (or Claude) as Reachable.
- "Region blocked" means the provider rejects that exit region; choose another region.
- For high latency or frequent drops, try nearby routes such as Japan, Singapore or South Korea.
5. Sign-in hangs or the callback fails
codex login, Gemini CLI and others sign in through the browser and receive a callback on a localhost port. If that request is also sent to the proxy, the page spins forever.
export NO_PROXY=localhost,127.0.0.1,::1
Or use TUN mode.
6. DNS and IPv6
- Keep the client's default fake-ip / enhanced DNS mode; don't hard-code overseas DNS servers in the OS.
- On some networks IPv6 bypasses the proxy. Turn off IPv6 in the client, or temporarily in the OS network settings, and retry.
- Corporate networks with HTTPS inspection (custom root certificates) need
NODE_EXTRA_CA_CERTSfor Node.js-based tools.
7. Error quick reference
| Error | Likely cause | Fix |
|---|---|---|
stream disconnected before completion |
Unstable node or interrupted long connection | Switch nodes; enable HTTP/1.1 mode in Cursor |
unsupported_country_region_territory |
Not using the proxy, or unsupported exit region | Check step 3, switch nodes |
error sending request / ECONNRESET |
Proxy not active or wrong port | Check the HTTPS_PROXY port |
403 / Request not allowed (Claude) |
Exit region restricted | Pick a node where Claude is Reachable |
| Sign-in page keeps spinning | localhost callback sent to the proxy | Set NO_PROXY or use TUN |
| Browser works but the CLI doesn't | Only the browser / system proxy is set | Use TUN or set the variables |
Still stuck?
Open a ticket in the console with:
- The full output of the check script
- The tool and version (for example
codex --version) - Your proxy client, whether TUN is on, and the current node name
- Screenshots or logs of the error
We'll help you sort it out.