[bug] OAuth, runtime and health requests ignore HTTP proxy environment variables on Node 22
Summary
OAuth device-code login and the default mcodex runtime do not honor standard HTTP proxy environment variables on Node 22. Requests can take the host's direct egress path despite a configured and reachable HTTP proxy.
Reproduction
- Configure an HTTP proxy through
HTTP_PROXYandHTTPS_PROXYin a headless Linux shell. - Run
codex-multi-auth login --device-auth. - The device-code request can fail with HTTP 403 and
unsupported_country_region_territory, while the same endpoint responds successfully through the configured proxy. - With valid credentials already saved, run a short
mcodex execrequest orcodex-multi-auth check accounts. - Inference can return HTTP 503 account-pool exhaustion after transport failures; health checks can report
signed in (live check failed: fetch failed)for otherwise valid credentials.
Expected Behavior
OAuth requests, default runtime HTTP requests, and health/quota probes should consistently honor HTTP_PROXY/HTTPS_PROXY and NO_PROXY.
Actual Behavior
These paths default to Node's built-in fetch without applying the project's existing proxy resolution helper. On the tested Node 22 installation, the configured proxy variables do not redirect those calls.
Attaching this package's Undici 8 dispatcher to Node 22's built-in fetch also fails due to incompatible dispatcher handler contracts. A proxy request must use a compatible fetch/dispatcher pair.
Environment
- Codex CLI: 0.162.1
codex-multi-auth: 2.22.0- Node.js: 22.20.0
- OS: Linux headless/remote shell
- Proxy configured through standard HTTP(S) environment variables
Diagnostic Outputs
Real device codes, account identifiers, proxy endpoints, credentials, and host paths are omitted. A controlled installed-package test completed real model requests for four valid Plus credentials after using the proxy-aware transport. A revoked credential was distinguishable as token_revoked rather than a network failure.
Compliance Confirmation
- [x] I am using this project for personal development workflows.
- [x] This report does not request policy bypasses or prohibited usage.
- [x] I removed any secrets/tokens from this report.