apply_patch "Update"/"Delete" always fails on Windows Desktop: fs sandbox helper stack overflow (0xC0000005 in essctl.dll); "Add" works
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the apply_patch verification path and the codex_core::tools::router log entry, then trace the Windows filesystem sandbox helper involved in reading existing files. Use the reproduction steps and Windows Application Event Log crash details to compare Update and Delete with Add. Done means existing-file updates and deletions apply successfully without the helper crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems, security, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100