Sandbox mode forced as read only

Resolved 💬 4 comments Opened Oct 15, 2025 by theodorDiaconu Closed Feb 15, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.46.0

Which model were you using?

other

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

So I start the codex with a custom profile and custom model provider.

I use /status command to see what's up:
│ Approval: on-request │
│ Sandbox: workspace-write

Good, I make the first request and inspect what's sent:

<environment_context> <cwd>/Users/*******</cwd> <approval_policy>on-request</approval_policy> <sandbox_mode>read-only</sandbox_mode> <network_access>restricted</network_access> <shell>zsh</shell> </environment_context>

Problem: can only use the model in readonly mode.
config.toml:

# use OpenAI Responses API by default; env overrides are respected
[model_providers.****]
name = "OpenAI"
base_url = "******"   # overridden by $OPENAI_BASE_URL
wire_api = "chat"                   # or "chat" for Chat Completions clones
request_max_retries = 3
env_key = "OPENAI_API_KEY"

[profiles.custom]
model = "****"
model_provider = "****"
approval_policy = "on-request"
sandbox_mode = "workspace-write"
model_reasoning_effort = "high"
model_reasoning_summary = "detailed"

I start it via codex --profile custom.

What is the expected behavior?

To work

What do you see instead?

Not working :))

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 10 months ago

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

  • #3922
  • #5034
  • #4151
  • #3368

Powered by Codex Action

theodorDiaconu · 10 months ago

Using the command line --full-auto when I start it makes it work.

lastzero · 10 months ago

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! 🙏

etraut-openai contributor · 6 months ago

This bug report is pretty stale at this point, so I'm going to close it out. If you're still this issue with the latest version, let us know.