"command failed; retry without sandbox" for every command in Codex CLI

Resolved 💬 4 comments Opened Apr 23, 2026 by Datamine Closed Apr 23, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.122.0

What subscription do you have?

Pay as you go API & Business

Which model were you using?

gpt-5.4-high

What platform is your computer?

Linux 6.8.0-101-generic x86_64 x86_64

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

tmux

What issue are you seeing?

Ever since codex version 0.115.0, it seems like nearly every command I run that makes a file edit fails and needs to be tried again. Upon retrying without the sandbox, it works. However, having to retry most commands is disruptive to the general workflow as it prevents the agent from doing work of any reasonable length autonomously.

The last version of codex I observed working without this issue was 0.114.0, but I'm under the impression that I will no longer be able to use this (forced deprecation) by May 8, which will be an issue for me.

Related Issue
Previously, other users reported it here: https://github.com/openai/codex/issues/12888

Other System Details

  • Terminal: tmux running inside konsole
  • OS: Ubuntu 24.04
  • Shell: Bash 5.2.21

What steps can reproduce the bug?

Screenshot of Behavior
<img width="749" height="480" alt="Image" src="https://github.com/user-attachments/assets/9b07fbfb-2671-4ac7-bf15-450449ef8bc6" />

Transcribed:

› can you make a new file that says foo

• What filename should I use?

› foo.txt, content: bar

• I’m creating foo.txt in the repo root with the exact content you specified.
• Added foo.txt (+1 -0)
    1 +bar

  Would you like to make the following edits?

  Reason: command failed; retry without sandbox?

› 1. Yes, proceed (y)
  2. Yes, and don't ask again for these files (a)
  3. No, and tell Codex what to do differently (esc)

  Press enter to confirm or esc to cancel

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #17525
  • #17337
  • #18354

Powered by Codex Action

viyatb-oai contributor · 4 months ago

@Datamine can you check if following the steps https://developers.openai.com/codex/concepts/sandboxing#prerequisites here fixes the issue for you?
You need to install bubblewrap and follow the instructions in the documentation if you are on Ubuntu 24.04

Datamine · 4 months ago

@viyatb-oai Problem resolved, thanks.

More context: I have had bubblewrap installed for a long time. bwrap was also accessible. I still got a warning message in my CLI:

(brex-receipts) v@work-kubuntu (main) brex-receipts $ codex
⚠ Codex's Linux sandbox uses bubblewrap and needs access to create user namespaces.

╭─────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.122.0)                          │
│                                                     │
│ model:     gpt-5.4 high   /model to change          │
│ directory: ~/splash-harness/Utilities/brex-receipts │
╰─────────────────────────────────────────────────────╯

  Tip: New Build faster with Codex.
(brex-receipts) v@work-kubuntu (main) brex-receipts $ bwrap
usage: bwrap [OPTIONS...] [--] COMMAND [ARGS...]

    --help                       Print this help
    --version                    Print version

I had to make the AppArmor changes as described in the documentation:

> sudo apt update
sudo apt install apparmor-profiles apparmor-utils
sudo install -m 0644 \
  /usr/share/apparmor/extra-profiles/bwrap-userns-restrict \
  /etc/apparmor.d/bwrap-userns-restrict
sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict
> sudo systemctl reload apparmor.service

and now it's working as expected.

Datamine · 4 months ago

As a suggestion, I'd recommend linking the warning message to the documentation so that the user knows what steps need to be taken. As-is, ⚠ Codex's Linux sandbox uses bubblewrap and needs access to create user namespaces. is not easily actionable.