[macOS] node_repl / Computer Use fails when CODEX_HOME is a symlink despite allow_symlinked_codex_home
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Codex App 26.915.31945 / Codex CLI 0.155.0-alpha.9.2; also verified with a local debug build of main
What subscription do you have?
Pro 20x
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
When CODEX_HOME is a symlink, node_repl / Computer Use fails before the JS kernel starts even though allow_symlinked_codex_home = true is present in $CODEX_HOME/config.toml.
The failure is in Seatbelt preparation for codex sandbox launched through CODEX_CLI_PATH: writable roots under the symlinked CODEX_HOME are rejected before sandbox_apply.
Error (paths redacted):
writable root <CODEX_HOME>/visualizations/<id> contains symlink component <CODEX_HOME>; symlinked writable roots are not supported.
Root cause: codex-rs/cli/src/debug_sandbox.rs calls create_seatbelt_command_args(...), and that wrapper in codex-rs/sandboxing/src/seatbelt.rs hardcodes allowed_symlinked_codex_home = None. Normal execution paths thread this opt-out through SandboxManager::with_allowed_symlinked_codex_home, but the debug-sandbox / sandbox-state path used by node_repl does not.
What steps can reproduce the bug?
- Use a symlinked
CODEX_HOME, e.g.CODEX_HOME=/tmp/codex-home-link -> /tmp/codex-home-real. - Set
allow_symlinked_codex_home = truein$CODEX_HOME/config.toml. - Start any
node_repl/ Computer Use session, or runcodex sandbox --sandbox-state-jsonwith a writable root under$CODEX_HOME/visualizations/<id>.
A/B check against the same config:
- Original
0.155.0-alpha.9.2: fails withsymlinked writable roots are not supportedfor both--sandbox-state-jsonand-c permissions.node_repl={filesystem = ...}forms. - Patched build: passes writable-root validation and reaches
sandbox_apply(or runs when not nested).
Minimal fix: add create_seatbelt_command_args_with_symlinked_home(...) and call it from debug sandbox with codex_config::allowed_symlinked_codex_home(&config.config_layer_stack, &config.codex_home).
What is the expected behavior?
With allow_symlinked_codex_home = true, writable roots beneath the opted-in symlinked CODEX_HOME should be accepted by every Seatbelt construction path, including codex sandbox --sandbox-state-json used by node_repl / Computer Use.
Additional information
Patch/diff: https://github.com/openai/codex/commit/403b6b06f57b22b4d90ab4cb5648bd3975dc411b
Files: codex-rs/cli/src/debug_sandbox.rs, codex-rs/sandboxing/src/seatbelt.rs, plus macOS integration test codex-rs/cli/tests/sandbox_symlinked_codex_home.rs.
The commit link is only for the exact diff; the repro above uses placeholders and contains no local paths.
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
Read codex-rs/cli/src/debug_sandbox.rs and the create_seatbelt_command_args wrapper in codex-rs/sandboxing/src/seatbelt.rs, then inspect the macOS integration test codex-rs/cli/tests/sandbox_symlinked_codex_home.rs. Verify the debug-sandbox path uses the configured symlink allowance and that the test accepts writable roots beneath a symlinked CODEX_HOME when enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- operating-systems, security, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100