Setting sandbox_mode in a profile does not apply and resets sandbox_mode to read_only

Resolved 💬 1 comment Opened Aug 28, 2025 by lionelchg Closed Oct 28, 2025

What version of Codex is running?

0.25.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Hi everyone,
Having the following config.toml yields unexpected behaviour:

[profiles.gpt-5-full-access]
approval_policy = "never"
model = "gpt-5"
sandbox_mode = "danger-full-access"

On a trusted workspace running codex and then /status yields:

/status
📂 Workspace
  • Path: ~/code/OpenAI/Coding/codex/codex-rs
  • Approval Mode: on-request
  • Sandbox: workspace-write
  • AGENTS files: ../AGENTS.md

But running codex -p gpt-5-full-access and then /status put the sandbox to read-only:

/status
📂 Workspace
  • Path: ~/code/OpenAI/Coding/codex/codex-rs
  • Approval Mode: never
  • Sandbox: read-only
  • AGENTS files: ../AGENTS.md

What is the expected behavior?

I would say there are two possibilities:

  • either be clear that sandbox_mode can not be set from a profile and throw an error if someone tries to set it inside a profile. It was really natural for me to try it out inside a profile after reading https://github.com/openai/codex/blob/main/docs/config.md to avoid passing the argument via CLI every time
  • or create in codex-rs/core/src/config_profile.rs a place for sandbox_mode to be passed in a ConfigProfile struct

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗