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
The OpenCode Go API (https://opencode.ai/zen/go/v1) is intermittently inaccessible from the OpenAI Codex CLI because Cloudflare returns HTTP 403 error 1010 ("The owner of this website (opencode.ai) has banned your access based on your browser's signature") for requests that fail bot detection. Since Codex CLI expects a JSON/SSE response, the HTML block page surfaces as:
stream disconnected before completion: Transport error: network error: error decoding response body
followed by automatic retries (retrying 1/5, 2/5, ...). The retries usually succeed eventually, but the failure rate is high enough to be disruptive.
This is the same root cause as #24284 (Copilot extension hitting Cloudflare 1010 on the same endpoint). The Copilot workaround was to set a browser-like User-Agent header — but Codex CLI does not expose a way to override the User-Agent for model API requests, so that workaround is not available here. A proxy also does not help because the block is based on the client signature (UA/TLS fingerprint), not the IP.
Configure Codex CLI with the OpenCode Go custom provider above.
Start a session and send a prompt (long agent turns with tool calls / reasoning make it more frequent).
Observe intermittent stream disconnected before completion: Transport error: network error: error decoding response body, then automatic retries.
Evidence
Reproduced locally: a plain HTTP client with a non-browser default User-Agent (Python-urllib/3.x) gets HTTP 403 with body error code: 1010 from https://opencode.ai/zen/go/v1/responses.
Same request with a browser-like or curl User-Agent returns 200 and streams normally (event: response.created, etc.).
The codex-cli/* User-Agent mostly passes, but the block is intermittent from certain network paths (e.g. China mainland → Cloudflare US edges), which matches the reported high retry frequency.
Official/well-known CLI clients such as the OpenAI Codex CLI should be able to use the documented OpenAI-compatible endpoints (/zen/go/v1/responses, /zen/go/v1/chat/completions) without being blocked by Cloudflare's browser-signature WAF rule, i.e.:
Whitelist the official codex-cli/* User-Agent (and TLS signature) on opencode.ai/zen/* API paths, or
Relax/disable the 1010 browser-signature rule for /zen/* API endpoints (they are API paths, not browser pages), or
Document supported User-Agent header values / a supported-client allowlist for third-party clients.
Actual behavior
Intermittent 403 error 1010 HTML responses → Codex CLI fails to decode the response body → repeated automatic retries → slow/unstable agent sessions.
Workaround currently used
Explicitly routing Codex through a local Clash proxy (still intermittent, because the block is client-signature based).
Relying on Codex CLI's automatic retries (frequently needed).
Description
The OpenCode Go API (
https://opencode.ai/zen/go/v1) is intermittently inaccessible from the OpenAI Codex CLI because Cloudflare returns HTTP 403 error 1010 ("The owner of this website (opencode.ai) has banned your access based on your browser's signature") for requests that fail bot detection. Since Codex CLI expects a JSON/SSE response, the HTML block page surfaces as:followed by automatic retries (
retrying 1/5,2/5, ...). The retries usually succeed eventually, but the failure rate is high enough to be disruptive.This is the same root cause as #24284 (Copilot extension hitting Cloudflare 1010 on the same endpoint). The Copilot workaround was to set a browser-like
User-Agentheader — but Codex CLI does not expose a way to override the User-Agent for model API requests, so that workaround is not available here. A proxy also does not help because the block is based on the client signature (UA/TLS fingerprint), not the IP.Environment
codex-cli 0.147.0-alpha.6.5(macOS arm64)deepseek-v4-flashSteps to reproduce
stream disconnected before completion: Transport error: network error: error decoding response body, then automatic retries.Evidence
Python-urllib/3.x) getsHTTP 403with bodyerror code: 1010fromhttps://opencode.ai/zen/go/v1/responses.curlUser-Agent returns200and streams normally (event: response.created, etc.).codex-cli/*User-Agent mostly passes, but the block is intermittent from certain network paths (e.g. China mainland → Cloudflare US edges), which matches the reported high retry frequency.opencode.ai/zen/go/v1/*for a CLI client.Expected behavior
Official/well-known CLI clients such as the OpenAI Codex CLI should be able to use the documented OpenAI-compatible endpoints (
/zen/go/v1/responses,/zen/go/v1/chat/completions) without being blocked by Cloudflare's browser-signature WAF rule, i.e.:codex-cli/*User-Agent (and TLS signature) onopencode.ai/zen/*API paths, or/zen/*API endpoints (they are API paths, not browser pages), orActual behavior
Intermittent
403 error 1010HTML responses → Codex CLI fails to decode the response body → repeated automatic retries → slow/unstable agent sessions.Workaround currently used
Operating System
macOS (arm64)
Terminal
Codex CLI / Codex Desktop