HTTPS_PROXY, HTTP_PROXY, ALL_PROXY). However, Node 22’s built-in fetch does not honor these variables by default. This page documents the behavior and the workaround Comis ships.
The Node 22 fetch caveat
Node 22’s built-infetch() — the global function exposed without an import — is implemented on top of the undici HTTP client. Unlike axios, node-fetch, or older HTTP libraries, Node’s built-in fetch silently ignores the HTTPS_PROXY and HTTP_PROXY environment variables. Setting them has no effect on requests made via fetch().
The unsupported_region error from auth.openai.com is the canonical signal that an operator needs a US-region proxy, but the obvious fix (export HTTPS_PROXY=http://proxy.example.com:8080) does nothing for the OAuth refresh path because the daemon uses fetch() (per pi-ai’s implementation) for token rotation.
How Comis honors HTTPS_PROXY
WhenHTTPS_PROXY (or HTTP_PROXY, or ALL_PROXY) is set in the daemon’s environment, Comis configures undici’s global dispatcher to route outbound requests through that proxy at boot time. This is done once during daemon startup and applies to every subsequent fetch() call — including OAuth token refreshes, the gateway callback’s exchange step, and any fetch_url skill invocations.
~/.comis/.env
Troubleshooting
For the
unsupported_region error code’s full classification and other OAuth error codes, see OAuth concepts -> Error classification.
Related
OAuth
Subscription-based authentication and the full OAuth error catalogue
Environment Variables
All env vars Comis reads, including proxy-related variables
Troubleshooting
Common issues across daemon, channels, and runtime
Daemon
Startup, shutdown, and the boot-time proxy wiring
