apply_patch "Update"/"Delete" always fails on Windows Desktop: fs sandbox helper stack overflow (0xC0000005 in essctl.dll); "Add" works
Open 💬 0 comments Opened Aug 13, 2026 by siqian233
apply_patch "Update"/"Delete" always fails on Windows Desktop: fs sandbox helper stack overflow (0xC0000005 in essctl.dll); "Add" works
Describe the bug
On Codex Desktop for Windows (version 26.803.10989.0), apply_patch operations that modify or delete an existing file fail deterministically before applying anything. The tool reports that the filesystem sandbox helper crashed with a stack overflow:
apply_patch verification failed: Failed to read <file>: fs sandbox helper failed with status exit code: 0xc0000005: thread '<unknown>' (PID) has overflowed its stack
Creating a new file with apply_patch works fine.
To Reproduce
- In a Codex Desktop session on Windows, use
apply_patchto create a small text file (e.g.work/foo.txtwith two short lines). This succeeds. - Use
apply_patchto change one line of that file. This fails with the message above. - Use
apply_patchto delete that file. This fails with the same message. - Create another new file with
apply_patch. This succeeds again.
The failure is independent of file size or content (reproduced with a two-line ASCII file). It is not caused by long lines, Unicode, or patch syntax.
Expected behavior
Update and Delete should apply like Add does.
Environment
- Codex Desktop version: 26.803.10989.0 (Windows, ChatGPT sign-in)
- OS: Windows 10 Pro 22H2 (10.0.19045), 64-bit
- Session type: projectless chat under the user Documents\Codex folder
Additional context
- Windows Application Event Log shows repeated
codex.execrashes with exception code0xC0000005inessctl.dll(offsets0x102ab/0x22db6), timestamped exactly whenapply_patchfails. - The same helper crash occurs for Update and Delete on any existing file; Add does not trigger it, which suggests the crash happens when the helper reads an existing file during verification.
- Local Codex log (target
codex_core::tools::router) records:apply_patch verification failed: Failed to read ...: fs sandbox helper failed with status exit code: ... has overflowed its stack. - Workaround used: delete the file with a shell command, then re-create it with
apply_patch(the Add path still works). This only works for scratch files; normal in-repo edits are blocked.
Related issues
- #29178 (fs-helper fails when global proxy env is set) - different failure mode
- #29072 (codex-windows-sandbox-setup.exe cannot launch from package path) - different failure mode
- #14211 / #13965 (Windows sandbox child-process launch path) - possibly related underlying sandbox path