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
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
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_
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
with
multi_agentmode, the same problem seems to impact sub-agent as well with observed error like:and effectively sub-agent gave up trying and not performing any assigned work.
The main thread was in full-access mode though (to bypass this error), so looks like there's also sub-agent inheritance problem (sub-agent didn't inherit full-access? but not sure if inheriting full-access is desirable behavior)?
Does my patch https://github.com/rebroad/codex/tree/fix-symlink-issues fix this issue also?
seems to have been fixed by 0.115.0, closing.