codex - 💡(How to fix) Fix Full access session still launches in workspace-write sandbox without NVIDIA device passthrough [2 comments, 2 participants]

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…
GitHub stats
openai/codex#19488Fetched 2026-04-26 05:16:25
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1

A Codex session that the user reports was granted full access is still running inside a workspace-write bubblewrap sandbox. The sandbox has no Linux capabilities and does not expose NVIDIA device nodes, so CUDA/NVML are unavailable even though the host driver sees the GPU.

This blocks GPU workloads from Codex despite the user granting full permission.

Root Cause

$ nvidia-smi -L
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.

Code Example

bwrap ... --dev /dev ... --unshare-user --unshare-pid --unshare-net ... codex-linux-sandbox ... --sandbox-policy {"type":"workspace-write", ... "network_access":false} ...

---

CapEff:      0000000000000000
CapBnd:      0000000000000000
NoNewPrivs:  1
Seccomp:     2

---

find /dev -maxdepth 1 -name 'nvidia*' -ls
# no output

---

$ nvidia-smi -L
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.

$ python -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count())"
False
0

---

/proc/driver/nvidia/gpus/0000:01:00.0/information
Model: NVIDIA GeForce RTX 5090
Device Minor: 0

/proc/driver/nvidia/version
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64 590.48.01

---

mknod /dev/nvidia0 c 195 0
mknod: /dev/nvidia0: Operation not permitted
RAW_BUFFERClick to expand / collapse

Summary

A Codex session that the user reports was granted full access is still running inside a workspace-write bubblewrap sandbox. The sandbox has no Linux capabilities and does not expose NVIDIA device nodes, so CUDA/NVML are unavailable even though the host driver sees the GPU.

This blocks GPU workloads from Codex despite the user granting full permission.

Environment

  • Codex CLI: codex-cli 0.124.0
  • Package: @openai/codex version 0.124.0
  • Repository metadata: https://github.com/openai/codex.git, directory codex-cli
  • Host GPU visible through /proc/driver/nvidia: NVIDIA GeForce RTX 5090
  • NVIDIA driver: 590.48.01
  • Workspace path: Linux host, Codex running under bwrap

Expected behavior

When the user grants full access / danger-full-access for the session, commands should not be placed in a restricted workspace-write sandbox that hides /dev/nvidia*. GPU workloads should be able to access CUDA devices when the host has a working NVIDIA driver/GPU.

Actual behavior

The Codex process is launched under bubblewrap with a workspace-write policy and an isolated /dev that lacks NVIDIA device nodes.

Observed PID 1 command includes:

bwrap ... --dev /dev ... --unshare-user --unshare-pid --unshare-net ... codex-linux-sandbox ... --sandbox-policy {"type":"workspace-write", ... "network_access":false} ...

Sandbox/capability diagnostics:

CapEff:      0000000000000000
CapBnd:      0000000000000000
NoNewPrivs:  1
Seccomp:     2

NVIDIA device nodes are absent:

find /dev -maxdepth 1 -name 'nvidia*' -ls
# no output

NVML/CUDA fail:

$ nvidia-smi -L
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.

$ python -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count())"
False
0

But the host driver/GPU is visible through /proc:

/proc/driver/nvidia/gpus/0000:01:00.0/information
Model: NVIDIA GeForce RTX 5090
Device Minor: 0

/proc/driver/nvidia/version
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64 590.48.01

Manual recovery is not possible from inside this process because there are no capabilities and mknod is denied:

mknod /dev/nvidia0 c 195 0
mknod: /dev/nvidia0: Operation not permitted

Impact

GPU experiments cannot be run from Codex even though the user granted full access and the host GPU/driver are present. The runtime permission state exposed to the agent appears inconsistent with the user-granted access level.

Request

Please check whether full-access sessions are accidentally still being launched with the workspace-write sandbox / isolated /dev, or whether NVIDIA device passthrough is missing for full-access Linux sessions.

extent analysis

TL;DR

The issue can be resolved by modifying the sandbox policy to include NVIDIA device nodes when the user grants full access.

Guidance

  • Verify that the --sandbox-policy flag in the bwrap command includes the necessary permissions to access NVIDIA device nodes when full access is granted.
  • Check the Codex configuration to ensure that the workspace-write policy is not being applied when full access is granted.
  • Investigate the possibility of adding NVIDIA device passthrough to the sandbox policy for full-access Linux sessions.
  • Test the bwrap command with the --dev flag to include the NVIDIA device nodes in the sandbox.

Example

No code snippet is provided as the issue is related to the configuration of the bwrap command and the sandbox policy.

Notes

The issue seems to be related to the sandbox policy not being updated when the user grants full access. The workspace-write policy is restricting access to the NVIDIA device nodes, which is causing the issue.

Recommendation

Apply a workaround by modifying the bwrap command to include the necessary permissions to access NVIDIA device nodes when full access is granted. This can be done by updating the --sandbox-policy flag to include the required permissions.

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…

FAQ

Expected behavior

When the user grants full access / danger-full-access for the session, commands should not be placed in a restricted workspace-write sandbox that hides /dev/nvidia*. GPU workloads should be able to access CUDA devices when the host has a working NVIDIA driver/GPU.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING