Agent edits resulting in "command failed; retry without sandbox?"

Resolved 💬 22 comments Opened Feb 26, 2026 by AdrianNO1 Closed Apr 1, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

Recently edits have started failing inside the sandbox and it doesn't give me any useful information as to why this is happening or how to fix it. It simply sends me a request like this:
"""
Would you like to make the following edits?
Reason: command failed; retry without sandbox?
"""

What I like about Codex is that I don't need to baby sit it due to the sandbox

View original on GitHub ↗

22 Comments

AdrianNO1 · 4 months ago

Not sure if the thread id was automatically added here, but it's 019c995e-593d-7b13-bd39-b97a9f7409c9

AdrianNO1 · 4 months ago

Looks like the github issue link I was given by codex does not set the template to bug report and include the thread Id like it should have: When I enter this link I just get a blank template
• Feedback uploaded. Please open an issue using the following URL:

https://github.com/openai/codex/issues/new?template=2-bug-report.yml&steps=Uploaded%20thread:%20019c995e-593d-7b13-bd39-b97a9f7409c9

Or mention your thread ID 019c995e-593d-7b13-bd39-b97a9f7409c9 in an existing issue.
<img width="1086" height="132" alt="Image" src="https://github.com/user-attachments/assets/2c40c78e-28bd-4be0-9008-58639addf0b6" />

Is this a known issue?

AdrianNO1 · 4 months ago

Update: The issue mas magically and mysteriously dissapeared. I won't close this issue because I still think it should have logged a clearer error message as to why it failed, so I would have been able to resolve this myself without a miracle.

"command failed" is not a clear enough error message.

FarbrorMartin · 4 months ago

I have this exact issue. Codex CLI on Windows 11. It keeps failing to edit a file and asks permission to try without sandbox. Every time I select Always and it still asks again for the same file next edit.

tomocrafter · 4 months ago

This is happening for me in Ubuntu 24.04 cli since today's update. using full permission via /permissions does not help
Downgrading to v0.114.0 solved this issue for me. I believe there are some degrations in 0.115.0.

Edit: v0.116.0 fixed this issue for me. but this version requires bubblewrap to be enabled (it is now enabled default if /usr/bin/bwrap is available).

valemilanesio · 4 months ago

Agree with comment above. It is happening for me too, in Ubuntu 24.04 since 0.115.0

ogensec · 4 months ago

Exact same issue since Ubuntu 24.04 0.115.0

krsriq · 4 months ago

Got the same issue on Ubuntu 25.10 starting with 0.115.0 - this makes Codex pretty much unusable right now.

NormanMises · 4 months ago

Yes, Ubuntu has also recently experienced sandbox failures

uwslgrzesik · 4 months ago

Same on Ubuntu 24.04 0.116.0

Datamine · 4 months ago

Also encountering this and downgrading to v0.114.0.

exhyy · 4 months ago

I encountered the same issue in a docker container (ubuntu 22.04) without privileged mode. Resolved by setting:

[features]
use_legacy_landlock = true
etraut-openai contributor · 3 months ago

This should be fixed in 0.117.0.

krsriq · 3 months ago

Works great in my setup now (Ubuntu 25.10), thanks @etraut-openai!

karpushchenko · 3 months ago

I tried on 0.117 and it was still asking for approval for each command on Kubuntu for me. Maybe even more approval requests because it started to ask approval to run Chrome MCP, which was not like that on 0.116.
Checking the /status, I've noticed │ Permissions: Custom (workspace-write, on-request) │, which I never changed and I used /permissions to set │ Permissions: Default │
.
However, even after restarting the codex cli it asks for a permission to edit files in the same workspace. I tried using 'yes and don't ask again', but it didn't help

uwslgrzesik · 3 months ago

Same here 0.117 doesnt work ootb (works with use_legacy_landlock)
(reopen?)

abulgher · 3 months ago

it is not fixed, on 0.117. It only works with the use_legacy

mtontsch · 3 months ago

This issue still appears to be reproducible on my setup with a newer version.

Version

codex-cli 0.117.0

Environment

Linux Ubuntu 24.04.3 LTS
Kernel: 6.14.0-37-generic
bwrap: 0.9.0

Behavior

With `codex --sandbox workspace-write`

  • File creation/edit fails
  • Shell commands fail before execution
  • Error:

`• I couldn’t modify test.txt because the workspace sandbox is failing before any edit command runs. Both shell and patch attempts are blocked with bwrap:
loopback: Failed RTM_NEWADDR: Operation not permitted, so no changes were made.
`

With `codex --sandbox danger-full-access `

→ Everything works normally (file writes, edits, commands)

valemilanesio · 3 months ago

Still the same problem, on 0.117. Xubuntu 24.04. I had to downgrade to 0.114 again @etraut-openai

JenniferBuehler · 3 months ago

FYI I also still have the same problem, @etraut-openai (on Ubuntu 24.04)

uwslgrzesik · 3 months ago

Its broken since 0.115, @etraut-openai please reopen.

etraut-openai contributor · 3 months ago

I'm going to close this issue (and lock it) because it's conflating a bunch of different issues. If you're experiencing this, please look for other active bug reports or open a new one and provide the information requested in the bug template.