Managed network proxy injects unsupported npm_config_http_proxy
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Codex version
0.154.0
Platform
macOS, Codex CLI managed network proxy enabled
Problem
Every npm or npx command prints:
npm warn Unknown env config "http-proxy". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
The managed network proxy injects both npm_config_http_proxy and NPM_CONFIG_HTTP_PROXY. npm normalizes these to http-proxy, which is not a supported npm config key. The supported npm proxy keys are proxy and https-proxy.
Reproduction
- Start a Codex session with the managed network proxy enabled.
- Run npx vitest --version or npm --version.
- Observe the warning above.
Clearing both unsupported variables for one command removes the warning. Registry access still works through the supported proxy variables that Codex also injects.
Expected behavior
Codex should retain HTTP_PROXY, HTTPS_PROXY, npm_config_proxy, npm_config_https_proxy, and their uppercase forms, but stop injecting npm_config_http_proxy and NPM_CONFIG_HTTP_PROXY.
Additional context
#4193 reported the same warning and was closed without a linked fix. The current 0.154.0 release still reproduces it. npm 12.0.2 still warns, so this remains an active forward-compatibility issue rather than an immediate npm 12 failure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the Codex CLI code that injects managed-proxy environment variables, focusing on npm_config_http_proxy and NPM_CONFIG_HTTP_PROXY. Reproduce with npx vitest --version or npm --version; done means those unsupported variables are absent while the listed supported proxy variables remain and npm no longer warns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100