codex - 💡(How to fix) Fix apply_patch opens a sandbox dialog though it shouldn't

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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'.

Fix Action

Fix / Workaround

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

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

apply_patch returned: aborted by user after 3.6s

Code Example

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'.
RAW_BUFFERClick to expand / collapse

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix apply_patch opens a sandbox dialog though it shouldn't