Windows: apply_patch fails with "split writable root sets" while all other file editing methods work

Open 💬 1 comment Opened Jul 26, 2026 by hasamu4jo
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the IDE extension are you using?

26.721.30844

What subscription do you have?

Go

Which IDE are you using?

VSCode, Antigravity IDE

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Summary

On Windows, apply_patch consistently fails, while all other editing methods (Ruby File API, PowerShell, Git, etc.) work correctly.

This reproduces in both VS Code and Antigravity IDE using the Codex extension.

---

Environment

  • OS: Windows 11 Pro 24H2
  • Codex Extension
  • Reproduced in:
  • VS Code
  • Antigravity IDE
  • PowerShell:
  • MSI version
  • C:\Program Files\PowerShell\7\pwsh.exe

---

Configuration

config.toml

model = "gpt-5.6-terra"
model_reasoning_effort = "medium"

[windows]
sandbox = "unelevated"

[projects.'...']
trust_level = "trusted"

---

Sandbox state

setup_marker.json

{
  "version": 5,
  "proxy_ports": [],
  "allow_local_binding": false,
  "read_roots": [],
  "write_roots": []
}

deny_read_acl_state.json

{
  "principals": {}
}

setup_error.json

{
  "code": "helper_unknown_error",
  "message": "setup refresh had errors"
}

---

Error

With

[windows]
sandbox = "unelevated"

apply_patch fails with

windows unelevated restricted-token sandbox cannot enforce split writable root sets directly; refusing to run unsandboxed

With

[windows]
sandbox = "elevated"

the error becomes

helper_unknown_error
setup refresh had errors

---

What works

The following all work successfully:

  • Ruby File API (File.binread / File.binwrite)
  • PowerShell file editing
  • Git diff
  • Ruby syntax check

Only apply_patch fails.

---

Additional investigation

I ruled out the following:

  • VS Code specific issue
  • Antigravity IDE specific issue
  • Multi-root workspace
  • OneDrive
  • Virtual drives
  • Symbolic links
  • Junctions
  • Hard links
  • Different drives
  • Network drives
  • Proxy configuration (proxy_ports is empty)

The project is located on a local NTFS volume.

Even opening only a single project folder reproduces the issue.

---

Expected behavior

apply_patch should work in the same environment where direct file editing already succeeds.

---

Actual behavior

Only apply_patch fails because of the Windows sandbox.
Other editing methods complete successfully.

What steps can reproduce the bug?

  • Create a project.
  • Please create a single Ruby script file and write some content in it.
  • In the Codex extension's chat window, ask it to "add a single-line comment to the Ruby source code."
  • As the title suggests, a "split writable root sets" error occurs.
  • Requesting edits using alternatives such as Ruby one-liners or PowerShell results in success.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #34993
  • #34970
  • #34294

Powered by Codex Action