OpenAI Codex · tool · fg-0503

Codex shell commands cannot reach the network in workspace-write, so npm install and curl fail

If you see npm install, pip install, or curl fails with DNS or connection errors inside Codex, the cause and the fix for OpenAI Codex are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
npm install, pip install, or curl fails with DNS or connection errors inside CodexAdding network_proxy domain rules does not enable any access
Cause
The default workspace-write sandbox keeps command network access off unless sandbox_workspace_write.network_access is true. The network_proxy feature only constrains traffic once access is on; with access off it does nothing.
Fix
Set network_access true under sandbox_workspace_write, and add network_proxy rules if you want an allowlist. Some Codex App versions have been reported to ignore the key, so test from the CLI first.
Apply
# ~/.codex/config.toml [sandbox_workspace_write] network_access = true
Affected
Codex CLI, IDE extension, and ChatGPT desktop app, workspace-write mode, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun