What happened?
Node.js 26 was released May 5, and includes a breaking change in relation to Nono's network proxy.
Node 26's built-in HTTP client (undici 8.x) no longer reads the HTTPS_PROXY environment variable by default. In prior Node versions, apps could call setGlobalDispatcher(new EnvHttpProxyAgent()) at startup to register a proxy-aware HTTP client globally, and both the app's own code and the built-in fetch() would use it. Node 26 broke this by switching to an incompatible internal registry key (undici.globalDispatcher.2 instead of .1), so the proxy-aware client the app registers is invisible to fetch(). The result: fetch() ignores the proxy, connects directly to the destination, and the sandbox blocks it with EPERM.
Setting NODE_USE_ENV_PROXY=1 tells Node 26's built-in fetch() to read HTTPS_PROXY directly, bypassing the broken registry
The main problem is that my pi coding agent was failing, also fixed by setting NODE_USE_ENV_PROXY=1 (and adding it to my profile's allow_vars).
Steps to reproduce
This fails on Node 26:
nono run -s --allow-domain api.z.ai --allow-cwd -- node -e 'fetch("https://api.z.ai/api/anthropic")'
Setting NODE_USE_ENV_PROXY=1 fixes it:
NODE_USE_ENV_PROXY=1 nono run -s --allow-domain api.z.ai --allow-cwd -- node -e 'fetch("https://api.z.ai/api/anthropic")'
Context
Easiest fix: Nono should set NODE_USE_ENV_PROXY=1 automatically when the proxy is active. It used to do this (added in 7271d64) but was removed in 5116fca to "avoid Node-specific flags that can perturb non-Node runtimes". In what way might NODE_USE_ENV_PROXY harm non-Node processes?
nono version
nono 0.50.0
Operating system
macOS
OS version / distro
15.7.5
Kernel version (Linux only)
No response
Profile (if relevant)
Additional context
No response
What happened?
Node.js 26 was released May 5, and includes a breaking change in relation to Nono's network proxy.
Node 26's built-in HTTP client (undici 8.x) no longer reads the
HTTPS_PROXYenvironment variable by default. In prior Node versions, apps could callsetGlobalDispatcher(new EnvHttpProxyAgent())at startup to register a proxy-aware HTTP client globally, and both the app's own code and the built-infetch()would use it. Node 26 broke this by switching to an incompatible internal registry key (undici.globalDispatcher.2instead of.1), so the proxy-aware client the app registers is invisible tofetch(). The result:fetch()ignores the proxy, connects directly to the destination, and the sandbox blocks it with EPERM.Setting
NODE_USE_ENV_PROXY=1tells Node 26's built-infetch()to readHTTPS_PROXYdirectly, bypassing the broken registryThe main problem is that my pi coding agent was failing, also fixed by setting
NODE_USE_ENV_PROXY=1(and adding it to my profile'sallow_vars).Steps to reproduce
This fails on Node 26:
Setting
NODE_USE_ENV_PROXY=1fixes it:Context
Easiest fix: Nono should set
NODE_USE_ENV_PROXY=1automatically when the proxy is active. It used to do this (added in7271d64) but was removed in5116fcato "avoid Node-specific flags that can perturb non-Node runtimes". In what way mightNODE_USE_ENV_PROXYharm non-Node processes?nono version
nono 0.50.0
Operating system
macOS
OS version / distro
15.7.5
Kernel version (Linux only)
No response
Profile (if relevant)
Additional context
No response