thread 'main' panicked at linux-sandbox/src/linux_run_main.rs:53:5:

Resolved 💬 7 comments Opened Sep 2, 2025 by dlukt Closed Nov 26, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.27.0

Which model were you using?

gpt-5 high

What platform is your computer?

Linux 6.16.4-arch1-1 x86_64 unknown

What steps can reproduce the bug?

I have no idea

What is the expected behavior?

no panic

What do you see instead?

✘ Failed to apply patch
  └ 
    thread 'main' panicked at linux-sandbox/src/linux_run_main.rs:53:5:
    Failed to execvp /home/darko/.nvm/versions/node/v22.14.0/lib/node_modules/@openai/.codex-h5l5jybi/bin/codex-x86_64-unknown-linux-musl (deleted): No such file or directory (os error 2)
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additional information

user
I prefer a full audit trail, add an OrderEvent entity (status, payload JSON, actor)

It's running in a Jetbrains console and been inactive about an hour
1303597 tokens used 52% context left

View original on GitHub ↗

7 Comments

supercos2 · 10 months ago

same error.. happens a lot... for all kinds of tasks ... including search tool!!!!

al3rez · 10 months ago

✘ Failed to apply patch

thread 'main' panicked at linux-sandbox/src/linux_run_main.rs:53:5:
Failed to execvp /home/al3rez/.local/share/mise/installs/node/24.7.0/lib/node_modules/@openai/.codex-FT5Q1GtX/bin/codex-x86_64-
unknown-linux-musl (deleted): No such file or directory (os error 2)
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Happened today first time after I updated to 0.31.0
OS: Linux Mint
Terminal: Ghostty

TheAhmadOsman · 9 months ago

same here, any update on this?

kvz · 9 months ago

Happens a lot for me.

✘ Failed to apply patch
  └ failed in sandbox:
    thread 'main' panicked at linux-sandbox/src/linux_run_main.rs:53:5:
    Failed to execvp /home/kvz/.npm-packages/lib/node_modules/@openai/.codex-n3oQqb01/vendor/x86_64-unknown-linux-musl/
codex/codex (deleted): No such file or directory (os error 2)
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I run rm -rf /home/kvz/.npm-packages/lib/node_modules/@openai && npm -g install @openai/codex when it happens and that fixes it, codex will just resume applying patches. Until that, it tries to work around it by shelling out, which is more slow error prone.

etraut-openai contributor · 7 months ago

I think this bug was fixed a while ago. If you're still seeing it, please open a new bug report and use the /feedback slash command to provide additional details.

GiveMe-A-Name · 6 months ago

I using codex@v0.86.0, same as error.

etraut-openai contributor · 6 months ago

@GiveMe-A-Name, if you're seeing this problem with a recent version of Codex, please open a new bug and provide any details or repro steps, including your Linux kernel version.

I'm going to lock this issue because it was resolved a long time ago.