Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After upgrading from 2026.4.12 to 2026.4.14, every openai-codex/gpt-5.4 agent turn fails because chatgpt.com/backend-api/v1 returns a Cloudflare bot-mitigation challenge page (HTTP 403, cf-mitigated: challenge) instead of an API response, with the failure misreported in logs as "DNS lookup for the provider endpoint failed."
Steps to reproduce
- Run OpenClaw 2026.4.12 with openai-codex/gpt-5.4 as the primary model and confirm agent turns succeed.
- Upgrade to 2026.4.14 with
openclaw update. Do not change any config or re-authenticate. - Send any message to an agent configured with openai-codex/gpt-5.4.
- Observe failure in the user journal:
journalctl --user -u openclaw-gateway -n 50 --no-pager - Confirm chatgpt.com is reachable and the block is at the Cloudflare layer, not DNS:
curl -sI https://chatgpt.com/backend-api/v1Returns: HTTP/2 403, cf-mitigated: challenge
Expected behavior
openai-codex/gpt-5.4 completes agent turns successfully using the stored ChatGPT OAuth token, as observed on 2026.4.12 with the same config and credentials.
Actual behavior
Every request fails. Gateway logs show:
[agent/embedded] embedded run agent end: isError=true model=gpt-5.4 provider=openai-codex error=LLM request failed: DNS lookup for the provider endpoint failed. rawError= <style global>body{font-family:Arial...
The rawError is a Cloudflare JS challenge HTML page, not a DNS failure. The DNS lookup succeeds; chatgpt.com resolves to Cloudflare IPs. The "DNS lookup failed" message is a misclassification (see #64092).
On the first retry the log reports "API rate limit reached" before switching to the DNS error on subsequent retries — both are misclassifications of the same Cloudflare 403 HTML response.
OpenClaw version
2026.4.14
Operating system
Ubuntu 24.04 / Linux 6.8.0
Install method
No response
Model
openai-codex/gpt-5.4
Provider / routing chain
openclaw -> openai-codex (chatgpt.com/backend-api/v1)
Additional provider/model setup details
- Auth method: ChatGPT OAuth (browser sign-in via
openclaw models auth login --provider openai-codex) - Re-authenticating after the upgrade does not resolve the issue. The OAuth token is valid and not expired (~7 days remaining). The block is at the Cloudflare header-detection layer, not the token layer.
- Fallback provider zai/glm-5.1 is confirmed working on the same machine and same network, ruling out a general connectivity issue.
- Deployment: self-hosted headless server (no browser present at request time).
- Config: agents.defaults.model.primary = openai-codex/gpt-5.4, fallback = zai/glm-5.1.
Logs, screenshots, and evidence
Gateway log (redacted):
[gateway] agent model: openai-codex/gpt-5.4
[agent/embedded] embedded run failover decision: decision=surface_error reason=timeout from=openai-codex/gpt-5.4
[errors] Long error truncated: <html>
[agent/embedded] embedded run agent end: isError=true model=gpt-5.4 provider=openai-codex error=<html>...
[agent/embedded] embedded run agent end: isError=true model=gpt-5.4 provider=openai-codex error=LLM request failed: DNS lookup for the provider endpoint failed. rawError=<html> <head> <meta name="viewport"...
Root cause traced in installed package:
File: node_modules/@mariozechner/pi-ai/dist/providers/openai-codex-responses.js (~line 715)
function buildBaseCodexHeaders(initHeaders, additionalHeaders, accountId, token) {
...
headers.set("originator", "pi");
const userAgent = _os ? `pi (${_os.platform()} ${_os.release()}; ${_os.arch()})` : "pi (browser)";
headers.set("User-Agent", userAgent);
return headers;
}
Cloudflare detects `originator: pi` and `User-Agent: pi (linux ...)` as non-browser traffic and issues a 403 challenge. This is the same root cause documented in #62142. The distinction from prior reports is that 2026.4.12 was not affected — something in 2026.4.14 changed the request code path so that it now consistently triggers this block.
Confirmed with curl:
$ curl -sI https://chatgpt.com/backend-api/v1
HTTP/2 403
cf-mitigated: challenge
content-type: text/html; charset=UTF-8Impact and severity
Affected: all self-hosted deployments using openai-codex/gpt-5.4 as primary model on 2026.4.14, headless (no browser) environment.
Severity: blocks all agent workflow — primary model has 100% failure rate.
Frequency: every request, 100% reproducible since upgrading to 2026.4.14.
Consequence: agents produce no responses via any configured channel; fallback provider must be used as primary workaround.
Additional information
Last known good version: 2026.4.12
First known bad version: 2026.4.14
This is a distinct regression from #62142 (reported on 2026.4.5) and #64174 (reported on 2026.4.9). Those reports describe users who never had it working on recent versions. This report confirms 2026.4.12 works and 2026.4.14 does not, with no config changes between upgrades.
The 2026.4.14 release notes mention changes to Codex transport policy and transport-turn-state resolution. One of those changes likely shifted the request code path in a way that re-exposed the originator: pi / User-Agent: pi header issue for users who were unaffected on 2026.4.12.
Workaround: set agents.defaults.model.primary to a working provider (e.g. zai/glm-5.1) until fixed.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
wsjwong commentedon Apr 14, 2026
Tested rollback to 2026.4.12 and it does not fix this.
Jpkovas commentedon Apr 14, 2026
tried a rollback and got the same error too
hlolli commentedon Apr 14, 2026
I nuked my openclaw directory and tried starting over, then this issue started to happen.
Gyvastis commentedon Apr 14, 2026
Confirming fix from #62087 works for this issue too. Symptoms matched exactly:
openai-codex/gpt-5.4failing with Cloudflare challenge HTML misreported as "DNS lookup for the provider endpoint failed" / "API rate limit reached".Direct curl to
chatgpt.com/backend-api/codex/responseswith the stored OAuth token returned streaming responses fine. Only the codex-acp subprocess was getting 403'd.Adding explicit provider transport mapping to
openclaw.jsonfixed it:Huge thanks to @st4rnin3 for documenting this in #62087 — the misleading error messages made this a nightmare to diagnose.
antonguzun commentedon Apr 14, 2026
@Gyvastis Thanks, it works for me
dougbeard commentedon Apr 15, 2026
@Gyvastis Thanks a bunch! This solved it for me to. Until OpenClaw breaks it again.
fix(codex): force codex_responses api_mode for openai-codex provider
fix(openai-codex): default undefined model.api to openai-codex-responses
harleymdsavage commentedon Apr 15, 2026
@Gyvastis thank you so much — this fixed it immediately.
iamgustav2 commentedon Apr 15, 2026
@Gyvastis You're the best. Thanks!
SunnyChan0621 commentedon Apr 15, 2026
Can confirm the same issue on a different environment:
models.providers.openai-codexoverride, no stale 5.1 refsSame symptoms: Cloudflare 403 (
cf-mitigated: challenge) fromchatgpt.com/backend-api, misreported asDNS lookup for the provider endpoint failed.Confirmed with curl from the same host:
The
originator: pi/User-Agent: pi (linux ...)header theory from the OP matches what we see. Last known good version for us was also 2026.4.12.Workaround: using fallback providers (zai/glm-5-turbo) for now.
tkarren commentedon Apr 16, 2026
I had the same issue and was able to resolve it with #66633 (comment)
Cocopuffs2390 commentedon Apr 16, 2026
Fixed with comment: #66633 (comment)
Thanks!
gardan commentedon Apr 16, 2026
Really frustrating, please resolve this ASAP. Make sure it is turned into Beta release blocker = YES. Many of us have codex subscriptions that cannot be used due to this. Downgrading to 2026.4.12 does not resolve it.
sercada commentedon Apr 16, 2026
Confirming this fix works here too on a fresh FlowerAI/OpenClaw 2026.4.14 server.
Symptoms matched exactly:
openai-codex/gpt-5.4returned empty replies in chatDNS lookup for the provider endpoint failedand sometimesAPI rate limit reachedmainhad validopenai-codexOAuth, but agent turns still failedWhat fixed it was adding an explicit provider mapping for
openai-codexinopenclaw.json:After restarting
openclaw-gateway, direct gateway inference succeeded again:{ "ok": true, "provider": "openai-codex", "model": "gpt-5.4", "outputs": [ { "text": "PROVIDER_FIX_OK" } ] }So in our case this was not a bad OAuth login and not a Control UI problem. It was the provider path/config behavior on 2026.4.14.
Thanks for documenting this workaround — it unblocked the new server immediately.
steipete commentedon Apr 21, 2026
Fixed by #69336, landed on
mainas8a2d7f2541e00879b3b9e4c712842cf49f1125a8.The built-in
openai-codexroute now uses the Codex backend path (/backend-api/codex) instead of the blocked legacy path. If this still reproduces after a build containing that commit, please open a fresh issue with the new request path and raw status/body.