Model modifying files in a very questionable way
Resolved 💬 4 comments Opened Apr 19, 2026 by AprilGrimoire Closed Apr 19, 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.121.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.4
What platform is your computer?
Linux 6.19.0-gentoo x86_64 AMD Ryzen 7 8845H w/ Radeon 780M Graphics
What terminal emulator and version are you using (if applicable)?
alacritty
What issue are you seeing?
✘ Failed to apply patch
─ Worked for 1m 03s ────────────────────────────────────────────────────────────────────
• The patch tool itself cannot write in this read-only session, and invoking the shell
wrapper is blocked as well. I’m switching to a single escalated file-write command for
main.typ only, then I’ll compile to catch Typst syntax issues.
✔ You approved codex to run python3 -c $'from pathlib import Path\ncontent =
r\'\'\'#import "@local/stux-... this time
• Ran python3 -c $'from pathlib import Path\ncontent = r\'\'\'#import "@local/
What steps can reproduce the bug?
Don't know
What is the expected behavior?
Codex should patch files in normal ways
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
Thanks for the bug report. We'll share the feedback with the team responsible for training our codex models. If you see other model behavior that you'd like to report, please use the
/feedbackcommand. That will provide us with additional details including logs and conversation text.https://github.com/openai/codex/issues/new?template=3-cli.yml&steps=Uploaded%20thread:%20019da6c7-100f-75a3-8c46-9d7088aa689c
thread ID 019dcf07-4286-78b3-854a-a89209924010