Runned a command in read-only mode to read a mentioned file

Resolved 💬 2 comments Opened Jan 2, 2026 by frbeyer Closed Jan 2, 2026

What version of Codex is running?

codex-cli 0.77.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Linux 6.8.0-90-generic x86_64 x86_64

What issue are you seeing?

Executed a command in read-only mode to read a mentioned file.

What steps can reproduce the bug?

Uploaded thread: 019b8032-7a02-7993-8449-f40d026f9d4c

What is the expected behavior?

Not execute commands. Codex should be run sandboxed. Only read the mentioned file without command/external programs.

Additional information

It seems codex-cli is not verifying the SandboxType in fn exec() at codex-rs/core/src/exec.rs nor the sandbox_policy in fn spawn_child_async at codex-rs/src/spawn.rs
The sandbox parameter at fn exec() seems to not being used if the target isn't Windows, also there is a macro flag to ignore unused variables.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗