Skip to content

codex sandbox aborts (SIGABRT, no diagnostic) when a permission profile omits / as a readable root #39528

Open

Description

@jeffolver-GCP

Summary

On Codex CLI 0.146.1 (macOS, arm64), a [permissions.<name>.filesystem] policy that lists only specific readable roots causes the sandbox to abort with SIGABRT and no diagnostic output at all — empty stdout, empty stderr, and nothing additional under RUST_BACKTRACE=1.

Adding "/" = "read" makes the same profile work. So the restricted-root configuration appears to be unsupported, but it fails as a silent crash rather than a configuration error.

Environment

Codex CLI : 0.146.1
OS        : macOS 15 (Darwin 25.6.0), arm64
Install   : npm @openai/codex

Reproducer

Works — sandbox executes, reads succeed, writes are denied:

[permissions.reviewer]
[permissions.reviewer.filesystem]
"/" = "read"

Also works — the deny carve-out is enforced:

[permissions.reviewer]
[permissions.reviewer.filesystem]
"/" = "read"
"/some/dir" = "deny"

SIGABRT — only explicit readable roots:

[permissions.reviewer]
[permissions.reviewer.filesystem]
"/path/to/workdir" = "read"

SIGABRT — explicit readable roots including system/runtime paths:

[permissions.reviewer]
[permissions.reviewer.filesystem]
"/usr" = "read"
"/bin" = "read"
"/sbin" = "read"
"/System" = "read"
"/Library" = "read"
"/private/var" = "read"
"/path/to/workdir" = "read"

Command:

CODEX_HOME=<tmp> codex sandbox --permission-profile reviewer -C <workdir> -- /bin/cat <workdir>/file

Observed

exit code : 134 (SIGABRT)
stdout    : (empty)
stderr    : (empty)
RUST_BACKTRACE=1 : no additional output

The positive control (/bin/echo) aborts identically, so nothing executes — this is not a filesystem-denial result, it is a crash during sandbox setup.

Expected

Either the restricted-readable-root configuration is supported, or Codex reports a clear configuration error explaining that a / readable root is required. A silent SIGABRT gives callers no way to distinguish "unsupported configuration" from "sandbox failed".

Why it matters

Building a review sandbox that can read only a specific directory currently isn't expressible: the only working shape is "/" = "read" plus deny entries, i.e. an unbounded denylist of everything sensitive on the host rather than a bounded allowlist. workspace_roots doesn't help — its fields are booleans, not paths — and --sandbox-state-readable-root exists on codex sandbox but not on codex review.

Activity

  1. added
    bug
    CLI
    sandbox
    config
    on Aug 19, 2026
  2. github-actions commented on Aug 19, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. ivermin1123 commented on Nov 13, 2026

    @ivermin1123

    Still happens on codex-cli 0.167.2 and 0.169.0, macOS 27.2.1 arm64.

    Smallest repro I found, a profile with no filesystem entries:

    printf 'default_permissions = "worker"\n[permissions.worker]\ndescription = "x"\n' > "$CODEX_HOME/config.toml"
    codex sandbox -- /bin/echo hi; echo "exit=$?"
    

    No output, exit=134. With extends = ":workspace" added to the profile it prints hi and exits 0.

    Same result when the profile exists only through -c and config.toml has no [permissions.worker] table:

    codex sandbox -P worker -c 'permissions.worker.network={enabled=true,mode="limited"}' -- /bin/echo hi
    

    I hit this when the table was missing from my config. The -c override created an empty profile, and every command in the session exited 134 with no message.

    The crash report is for the child, not codex: /bin/echo, EXC_CRASH, SIGABRT, namespace 0x23, code 2. Same as #46406.

    codex-rs/core/src/config/permissions.rs (rust-v0.169.0) has missing_filesystem_entries_warning for this case ("does not define any recognized filesystem entries"), but codex sandbox does not print it. Printing that warning, or exiting with an error when the profile has no readable root, would make the cause visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugconfigsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions