apply_patch opens a sandbox dialog though it shouldn't

Open 💬 2 comments Opened May 17, 2026 by moddyfire

What version of Codex CLI is running?

0.125

What subscription do you have?

I don't know how to tell that

Which model were you using?

gpt-5.5

What platform is your computer?

linux

What terminal emulator and version are you using (if applicable)?

irrelavant

Codex doctor report

codex doctor --json
error: unexpected argument '--json' found

  tip: to pass '--json' as a value, use '-- --json'

Usage: codex [OPTIONS] [PROMPT]
       codex [OPTIONS] <COMMAND> [ARGS]

For more information, try '--help'.

What issue are you seeing?

I start a new session in a new directory.

For these 3 requests, none of them needed approval but it did ask for it.

╭──────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.125.0) │
│ │
│ model: gpt-5.4 medium /model to change │
│ directory: ~/temp │
╰──────────────────────────────────────────────╯

Tip: Paste an image with Ctrl+V to attach it to your next message.

› please create here a file named hello.txt with the content Hello, World

✔ You approved codex to run printf 'Hello, World' > hello.txt this time

• Ran printf 'Hello, World' > hello.txt
└ (no output)

────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• Done.

I removed the files and asked again to create them. This time I did not approve.

› create foo.txt again

• Added foo.txt (+1 -0)
1 +Foo Bar

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to
report the issue.

› who sent the request to open a sandbox dialog? what did apply_patch return?

• I sent the tool request.

There should not have been a sandbox approval dialog for apply_patch itself.

apply_patch returned:
aborted by user after 3.6s

So that file creation did not complete from that interrupted call.

What steps can reproduce the bug?

Create a new directory.
Run codex and say 'yes' to write in that diretory.
Ask to create a simple file.

What is the expected behavior?

That it will create the file

Additional information

It happens in 0.130
It doesn't happen in 0.123 on my mac - it works fine there

View original on GitHub ↗

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