-
Notifications
You must be signed in to change notification settings - Fork 10.3k
5.3 apply_patch fails under sandboxed default permission on Windows #13574
Description
What version of the Codex App are you using (From “About Codex” dialog)?
0.108.0-alpha.8
What subscription do you have?
$200
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
This report was generated by 5.3-codex itself, and confirmed by me: It fails to apply any patches under the default permission mode, showing "Refused" on the UI. However, patches can be applied with highest permissions. Meanwhile, Codex on macOS can correctly apply patches with default permissions. Therefore, I suspect this is a bug. I conducted a test with 5.3-codex and got the following report:
Summary
When running in workspace-write (not read-only), built-in apply_patch fails for both Add File and Update File with:
- Exit code: 1
- Empty output
No permission/grant prompt is shown, and no actionable error message is returned.
Environment
- Workspace:
E:\c_misc\tmp\testspace - Mode shown:
workspace-write - Shell not used for repro (built-in tool only)
- Network restriction status is irrelevant for this repro
Reproduction Steps
- Try creating a file via
apply_patch:Add File: ap_test_create.txt- content:
apply_patch create test
- Try updating an existing file via
apply_patch:Update File: daipaibulaodi.ja.md- replace first line with another line
- (Control) Try deleting the not-created file:
Delete File: ap_test_create.txt
Expected Behavior
- In
workspace-write,Add FileandUpdate Fileshould succeed in workspace paths. - If blocked, the tool should return a clear permission/validation error.
Actual Behavior
Add File: Exit code 1, empty outputUpdate File: Exit code 1, empty outputDelete File: returns a normal verification error (file not found), indicating path checks still work
Raw Observations
- No escalation/permission prompt appeared for failed
Add/Update. - Failures are reproducible and opaque (no stderr/body), which makes diagnosis difficult.
Impact
- Prevents basic file creation/editing through built-in tool even in non-read-only mode.
- Blocks normal coding workflow and automated patching.
What steps can reproduce the bug?
-
Create a new folder and add a file with a few lines of content
-
Ask 5.3-codex to modify the file under the default permission mode
-
Observe the "Refused" error on the UI
What is the expected behavior?
The file should be edited properly
Additional information
No response