codex - 💡(How to fix) Fix codex-linux-sandbox binary absent from @openai/codex npm package; permissions.network_access unusable without danger-full-access

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

@openai/[email protected] (npm) ships the main codex Rust binary inside node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex, but does not ship codex-linux-sandbox. Because the [permissions] config block delegates network-policy enforcement to codex-linux-sandbox, any profile that sets network_access = true is silently broken on npm installs.

Error Message

Fails with a bwrap/execvp error referencing codex-linux-sandbox: No such file or directory.

Root Cause

The [permissions] feature presumably calls out to codex-linux-sandbox to construct a Bubblewrap namespace with selective network access. Since the binary is absent, the sandbox launcher cannot be invoked.

Fix Action

Fix / Workaround

There is no narrow workaround. The only way to unblock loopback access (e.g., localhost:5432 for a dev DB) is:

Code Example

~/.npm-global/lib/node_modules/@openai/codex/
  node_modules/@openai/codex-linux-x64/
    vendor/x86_64-unknown-linux-musl/
      codex              ← main binary (present)
      codex-resources/   ← present

---

npm install -g @openai/codex@0.129.0

# Add permissions profile to config
cat >> ~/.codex/config.toml <<'TOML'
[permissions]
network_access = true
TOML

codex exec "curl -s http://localhost:5432"
# or any task that triggers the sandbox network path

---

sandbox_mode = "danger-full-access"
RAW_BUFFERClick to expand / collapse

Summary

@openai/[email protected] (npm) ships the main codex Rust binary inside node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex, but does not ship codex-linux-sandbox. Because the [permissions] config block delegates network-policy enforcement to codex-linux-sandbox, any profile that sets network_access = true is silently broken on npm installs.

Environment

  • OS: Ubuntu 24.04 (WSL2, kernel 6.6.87.2)
  • Architecture: x86_64
  • Install: npm install -g @openai/[email protected] (not NVM, standard global)
  • Node: 22.x / npm 10.x

What is present in the package

~/.npm-global/lib/node_modules/@openai/codex/
  node_modules/@openai/codex-linux-x64/
    vendor/x86_64-unknown-linux-musl/
      codex              ← main binary (present)
      codex-resources/   ← present

codex-linux-sandbox is not in the tree. find ~/.npm-global -name "codex-linux-sandbox" returns nothing.

Reproduce

npm install -g @openai/[email protected]

# Add permissions profile to config
cat >> ~/.codex/config.toml <<'TOML'
[permissions]
network_access = true
TOML

codex exec "curl -s http://localhost:5432"
# or any task that triggers the sandbox network path

Fails with a bwrap/execvp error referencing codex-linux-sandbox: No such file or directory.

Root cause

The [permissions] feature presumably calls out to codex-linux-sandbox to construct a Bubblewrap namespace with selective network access. Since the binary is absent, the sandbox launcher cannot be invoked.

Impact

There is no narrow workaround. The only way to unblock loopback access (e.g., localhost:5432 for a dev DB) is:

sandbox_mode = "danger-full-access"

This disables the sandbox entirely — far broader than needed for trusted local dev workflows.

Request

One of:

  1. Ship codex-linux-sandbox in the npm package alongside the main binary (as an optional dependency or bundled in the vendor directory).
  2. Document the install path — e.g., cargo install codex-linux-sandbox, or a standalone release tarball — so users can place it somewhere on $PATH that the launcher will find.
  3. Add a --allow-network <pattern> / --allow-loopback flag (or network_allowlist config key) for narrow loopback whitelisting without requiring full sandbox bypass.

Related

  • #20906 — sandbox launcher unavailable when codex is installed via NVM (the NVM prefix isn't mounted inside bwrap). Distinct root cause, same symptom class.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix codex-linux-sandbox binary absent from @openai/codex npm package; permissions.network_access unusable without danger-full-access