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_

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.

  • #18535
  • #18079
  • #18269

Powered by Codex Action

etraut-openai contributor · 4 months ago

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 /feedback command. That will provide us with additional details including logs and conversation text.

devmasonz · 4 months ago

thread ID 019dcf07-4286-78b3-854a-a89209924010