run_in_container.sh forces --full-auto and discards user flags for approval-mode

Resolved 💬 1 comment Opened May 2, 2025 by braun-viathan Closed Aug 7, 2025

What version of Codex is running?

0.1.4161210

Which model were you using?

o4-mini

What platform is your computer?

Linux 6.8.0-58-generic x86_64 x86_64

What steps can reproduce the bug?

  1. Run the script with any command line option like: --approval-mode suggest.
  2. Observe that Codex still starts in Full Auto.

What is the expected behavior?

– the script should use the provides approval-mode as the model param

What do you see instead?

--full-auto is hard‑coded in run_in_container.sh.

~/dev/codex/codex-cli/scripts/run_in_container.sh --work-dir ~/dev/ai/codex "Hello world" --approval-mode suggest --model o3

....
Firewall configuration complete
Verifying firewall rules...
Firewall verification passed - unable to reach https://example.com as expected
Firewall verification passed - able to reach https://api.openai.com as expected
╭──────────────────────────────────────────────────────────────╮
│ ● OpenAI Codex (research preview) v0.1.2504251709            │
╰──────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────╮
│ localhost session: <<Session_id>>                            │
│ ↳ workdir: ~/dev/ai/codex                                    │
│ ↳ model: o3                                                  │
│ ↳ provider: openai                                           │
│ ↳ approval: full-auto                                        │
╰──────────────────────────────────────────────────────────────╯

Additional information

Proposed fix:

  • Delete the literal <code>--full-auto</code>; leave the quoting loop untouched.

Unclear:

  • Why was full auto hard coded does run in container need to be always in full-auto mode for any reason I am missing ?

PR incoming. ;)

FYI: if this is merged fast I would like to make a second PR on the run_in_container.sh which shall enhance the container to also mount the ~/.codex/ into the container so user configs, instructions and sessions are reusable in the container env.

View original on GitHub ↗

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