Apply-Patch File Editing Constraints Prevent Codex From Editing Files

I’m using the Codex desktop on Windows 10, version 26.818.61809.

I’m using Codex to program an Unreal Engine 5.8.1 application and using GitHub.

As of today, Codex is failing to edit local files due to the following restriction: “Use apply_patch for local file edits. Do not create or edit files with cat or other shell write tricks.”

Codex informed me that this is a developer instruction, and not something I can change. This higher-priority instruction is why Codex “did not substitute PowerShell Set-Content, redirection, or similar direct-write workarounds.”

The patch tool returns the following error: “Failed to write file B:\XXX\YYY\Docs\Milestones\R44\”

Codex made the following findings:

  1. Docs, Docs/Milestones, and Docs/Milestones/R44 are ordinary directories—not reparse points or symlinks.
  2. Their ACLs grant Modify access to the Codex sandbox user; the target files are not read-only.
  3. The worktree is valid and located at B:\XXX\YYY.
  4. No Git command, GitHub operation, staging operation, or remote access occurs before the failure.
  5. Existing Docs files can be patched, proving it is specifically new-file creation beneath Docs/.
  6. Temporary diagnostic changes were fully removed; no tracked repository changes remain from testing.

The strongest lead is a sandbox-ownership inconsistency: Docs and Docs/Milestones are owned by PC\CodexSandboxOffline, while the repository root and Source are owned by PC\<user>. Although their ACLs look writable, the patch layer appears to apply an additional owner/path policy when creating files. That is an inference, but it exactly matches the observed boundary.

Codex tested an all-patch create-then-move approach, but the patch layer falsely rejected the move as involving a reparse point.

Version/process evidence:

  • Desktop app package: OpenAI.Codex_26.818.8289.0_x64__2p2nqsd0c76g0
  • Sandbox command runner: codex-command-runner-0.149.0-alpha.4.3
  • Codex/ChatGPT desktop processes were active during testing.

Welcome to the forum!

You are welcome to discuss Codex issues here. However, the official place to report and track them is the OpenAI Codex GitHub issue tracker.

I asked ChatGPT to look for the closest related issue, and it identified:

If that issue matches your problem, consider adding a :+1: reaction on the GitHub issue itself—not only on this forum topic. Reactions on GitHub can help the developers gauge the number of affected users.

If it does not describe the same problem, search the existing Codex issues for a closer match. If you cannot find one, open a new issue and include as much relevant detail as possible.

This resolved my issue. Thank you!