Skip to content

codex debug seatbelt ignores sandbox_mode in ~/.codex/config.toml #4151

Closed

Description

@maelvls

Hey,

I am trying to understand why I wasn't able to run go build . (same issue as in #207). To iterate quicker, I decided to not run Codex in TUI mode, and instead just use:

codex debug seatbelt go build .

For context, my config.toml looks like this:

model = "gpt-5-codex"
sandbox_mode = "workspace-write"
[sandbox_workspace_write]
writable_roots = [
    "/Users/mvalais/Library/Caches",
    "/Users/mvalais/go/pkg/mod/cache",
]

I later realized that the codex debug seatbelt command was simply ignoring the sandbox_mode. I've dug into the code and found this:

let sandbox_mode = create_sandbox_mode(full_auto);

(had to run lldb to find that out)

So it looks like the only way to test whether my config.toml is correct is to replicate what I have in my config.toml using --full-auto (since --sandbox workspace-write isn't supported either).

Is this behavior intentional?

Thanks for taking a look!

Activity

  1. bolinfest commented on Oct 16, 2025

    @bolinfest
    Collaborator

    It's somewhat intentional in that we currently use this for ad-hoc debugging and haven't polished the args to the point where it's something we want to promote. So you're right that --full-auto is the best way to approximate workspace-write at the moment.

  2. lastzero commented on Oct 17, 2025

    @lastzero

    Based on GPT-5 Thinking's recommendation, I used Codex CLI profiles to switch the authentication method between "apikey" for larger tasks and "chatgpt" for quick tasks.

    This issue prevents me from using profiles, so hopefully it will be resolved in an upcoming release! 🙏

  3. added
    bugSomething isn't working
    sandboxIssues related to permissions or sandboxing
    and removed
    enhancementNew feature or request
    on Nov 11, 2025
  4. etraut-openai commented on Jan 10, 2026

    @etraut-openai
    Contributor

    Closing out old bugs.

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

    bugSomething isn't workingsandboxIssues related to permissions or sandboxing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions