apply_patch fails on Windows with `CreateProcessAsUserW failed: 206` for large patch payloads
What version of Codex CLI is running?
codex-cli 0.117.0
What subscription do you have?
Pro
Which model were you using?
_No response_
What platform is your computer?
x64
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
On Windows, apply_patch fails when the patch payload is large, for example when adding a single large HTML file with inline CSS and JS in one patch.
Instead of applying the patch, Codex returns:
execution error: Io(Custom { kind: Other, error: "windows sandbox: runner error: CreateProcessAsUserW failed: 206" })
Splitting the same change into multiple smaller apply_patch calls works.
What steps can reproduce the bug?
- Add a single
index.htmlfile with a large amount of inline CSS and JS. - The patch is roughly in the 100KB-scale range.
apply_patchfails before the patch is applied with:windows sandbox: runner error: CreateProcessAsUserW failed: 206
What is the expected behavior?
Large patches should either:
- work correctly on Windows
For single-file HTML/CSS/JS outputs or other generated assets, it is natural to emit one large patch. Having to manually split patches is cumbersome and seems unnecessary if the runner can avoid command-line length limits.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗