# skill-openclaw-openai-codex-proxy-patch **Repository Path**: it-wind/skill-openclaw-openai-codex-proxy-patch ## Basic Information - **Project Name**: skill-openclaw-openai-codex-proxy-patch - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-18 - **Last Updated**: 2026-03-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # openclaw-oauth-proxy-patch Fix OpenClaw `openai-codex` OAuth failures caused by proxy/egress mismatch, especially: - `code->token failed: 403 ... unsupported_country_region_territory` - `Error: Token exchange failed` - `No API key found for provider "openai-codex"` - `LLM request timed out` - Message sent but no assistant reply This skill patches both OAuth and model request paths to honor proxy env vars (`HTTPS_PROXY` / `HTTP_PROXY` / `ALL_PROXY`), then guides re-login and verification. ## Install Install this skill into Codex: ```bash python3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \ --repo it-wind/skill-openclaw-openai-codex-proxy-patch \ --path . ``` If needed, use URL install: ```bash python3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \ --url https://gitee.com/it-wind/skill-openclaw-openai-codex-proxy-patch ``` Restart Codex after installation. ## Use In Codex chat, invoke: ```text $openclaw-oauth-proxy-patch ``` Or describe your error logs; the skill is configured to match the error signatures above. ## Manual Commands From the skill directory: ```bash bash scripts/fix_openclaw_openai_codex_auth.sh ``` Optional: ```bash bash scripts/verify_openclaw_oauth_proxy_patch.sh bash scripts/apply_openclaw_oauth_proxy_patch.sh ``` ## Proxy Example ```bash 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 openclaw models auth login --provider openai-codex --set-default ``` ## Verify Success ```bash openclaw models status ls -l ~/.openclaw/agents/main/agent/auth-profiles.json ``` ## Notes - Patch target file: - `/opt/homebrew/lib/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/openai-codex.js` - Patch target file: - `/opt/homebrew/lib/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/providers/openai-codex-responses.js` - Apply script is idempotent and creates timestamped backups. - Re-verify and re-apply after OpenClaw upgrades. - Do not share `auth-profiles.json` contents.