Bug type
Behavior bug (incorrect output/state without crash)
Summary
OpenClaw latest version cannot complete openai-codex OAuth in my environment, while official codex-cli works on the same machine/network/account.
Environment:
- macOS
- Latest OpenClaw
- Node v24.14.0
What I tested:
- Browser OAuth page opens normally.
- Local callback on localhost:1455 works.
curl -I https://auth.openai.com/oauth/token reaches the endpoint and returns HTTP 405 when proxy is enabled.
- Official
codex login succeeds on the same machine, same browser, same account, same network/proxy.
openclaw models auth login --provider openai-codex consistently fails at code->token exchange with:
403 unsupported_country_region_territory
- I also tested with:
- http_proxy / https_proxy
- ALL_PROXY
- forcing Node proxy through global-agent preload
Result is unchanged.
Conclusion:
This appears to be specific to OpenClaw's openai-codex OAuth/token exchange path rather than a general account/network/browser issue.
Steps to reproduce
- Run: openclaw models auth login --provider openai-codex
- Browser opens and login completes successfully
- Paste redirect URL back into CLI (or auto callback)
- OpenClaw fails during code->token exchange
Expected behavior
OAuth should complete successfully and return a valid token, similar to official codex-cli login.
Actual behavior
OpenClaw consistently fails with:
403 {"error":{"code":"unsupported_country_region_territory","message":"Country, region, or territory not supported"}}
while official codex login works on the same machine, same account, same network.
OpenClaw version
2026.3.13
Operating system
macOS14.2.1
Install method
npm全局
Model
glm-5
Provider / routing chain
OpenClaw CLI -> openai-codex provider -> local proxy (http://127.0.0.1:2022 / socks5://127.0.0.1:1080) -> browser OAuth flow -> localhost:1455 callback -> auth.openai.com/oauth/token
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Notes:
- curl to https://auth.openai.com/oauth/token works (returns 405)
- proxies configured (http_proxy, https_proxy, ALL_PROXY)
- also tested with global-agent (forced Node proxy), same result
- official codex-cli login succeeds
Additional information
No response
Bug type
Behavior bug (incorrect output/state without crash)
Summary
OpenClaw latest version cannot complete
openai-codexOAuth in my environment, while official codex-cli works on the same machine/network/account.Environment:
What I tested:
curl -I https://auth.openai.com/oauth/tokenreaches the endpoint and returns HTTP 405 when proxy is enabled.codex loginsucceeds on the same machine, same browser, same account, same network/proxy.openclaw models auth login --provider openai-codexconsistently fails at code->token exchange with:403 unsupported_country_region_territory
Result is unchanged.
Conclusion:
This appears to be specific to OpenClaw's
openai-codexOAuth/token exchange path rather than a general account/network/browser issue.Steps to reproduce
Expected behavior
OAuth should complete successfully and return a valid token, similar to official codex-cli login.
Actual behavior
OpenClaw consistently fails with:
403 {"error":{"code":"unsupported_country_region_territory","message":"Country, region, or territory not supported"}}
while official
codex loginworks on the same machine, same account, same network.OpenClaw version
2026.3.13
Operating system
macOS14.2.1
Install method
npm全局
Model
glm-5
Provider / routing chain
OpenClaw CLI -> openai-codex provider -> local proxy (http://127.0.0.1:2022 / socks5://127.0.0.1:1080) -> browser OAuth flow -> localhost:1455 callback -> auth.openai.com/oauth/token
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Notes:
Additional information
No response