Failed to apply patch: bwrap: Can't mkdir .codex/memories: No such file or directory

Resolved 💬 4 comments Opened Mar 10, 2026 by yitoli-c Closed Mar 17, 2026

What version of Codex CLI is running?

codex-cli 0.113.0

What subscription do you have?

Business

Which model were you using?

_No response_

What platform is your computer?

Linux 4.18.0-553.63.1.el8_10.x86_64 x86_64 x86_64

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

_No response_

What issue are you seeing?

✘ Failed to apply patch
└ bwrap: Can't mkdir .../.codex/memories: No such file or directory

With bubblewrap sandbox, when codex is trying to apply_patch to files within workspace, this error steers it to figure out how to fix this problem first, and it has to go through shell alternatives, such as using perl, python to do file edits.

With default workspace-write mode, when editing files in workspace, I expect apply_patch should succeed.

Previously reported in #13635 but still seeing the same error in 0.113.0. I can't reopen the issue, so opening a new one here.

What steps can reproduce the bug?

Uploaded thread: 019cd9a4-b607-7732-8d39-82b792f03540

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

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