Repository navigation
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
Activity
github-actions commentedon Mar 5, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
adxptived commentedon Mar 5, 2026
the same
doublemover commentedon Mar 5, 2026
Mine's asking for permissons to do anything constantly, doesn't matter if I give it full access, default, etc. It's impossible to use! It also does not remember any "for this session" choice, and neither do sub agents. It's entirely unsuitable for work
FylmTM commentedon Mar 5, 2026
Same issue. GPT-5.4 debugged itself and created bug report:
Version:
Issue:
apply_patchalways fails in Desktop withexit_code: 1and empty output. No file changes are made.Debugging results:
apply_patchcreate: failedapply_patchupdate on existing file: failedapply_patchsucceededConclusion:
This looks Desktop-specific, not a workspace permission issue, not general file I/O, and not a basic patch syntax problem.
skbtwiz commentedon Mar 5, 2026
I am facing this same issue too, switching to Full Access mode worked for me, though this is not desirable. When I try to submit feedback using /feedback it doesn't work and gives me an error saying feedback could not be submitted.
yaboijbigs commentedon Mar 5, 2026
Using Codex windows app. GPT-5.4 with Full Access and Extra High Reasoning can't use the apply_patch tool and keeps saying it is failing with exit code 1. Here is the thread_id: 019cc04f-565c-7543-a0ff-9424111927d9
AriMKatz commentedon Mar 5, 2026
same issue. Codex told me to say this:
siddhantparadox commentedon Mar 6, 2026
apply_patch works in native codex CLI on this machine, but fails in the Codex Windows app under sandboxed modes. Device context: Lenovo model 83F5, Windows 10.0.26200.0, CPU Intel(R) Core(TM) Ultra 9 275HX, RAM 33,752,997,888 bytes (~31.4 GB), native PowerShell environment, repo on local Windows filesystem. In the app, [features] apply_patch_freeform = true is enabled. Repro is a trivial patch such as:
*** Begin Patch
*** Add File: smoke.txt
+hello
*** End Patch
A trivial update to an existing file also fails. In the Codex Windows app, every apply_patch invocation fails immediately with exit code 1 and no diagnostic output. I confirmed this is not a patch-format or path issue: absolute path, relative path, Add File, and Update File variants all fail. It also fails in sandboxed configuration with: approval_policy = "never", sandbox_mode = "workspace-write", [sandbox_workspace_write] network_access = true, [windows] sandbox = "elevated", and features.unified_exec = true. It succeeds only in Full access / danger-full-access. Control case: native codex CLI using the same machine, same repo, and same config can apply patches successfully. That strongly suggests the issue is specific to the Codex Windows app’s sandboxed apply_patch path, likely in the native Windows workspace-write sandbox/integration rather than config, approvals, or patch content.`
17 remaining items
etraut-openai commentedon Mar 9, 2026
@ningjiaen123, we don't release on a fixed schedule, but we generally publish two or three releases each week. That means we should have a new release out in the next day or two.
YourNeighborZ commentedon Mar 9, 2026
IGNORE - diagnostic read attempt by assistant; please disregard.
NESTOWL commentedon Mar 10, 2026
ribber commentedon Mar 10, 2026
same problem
apuppy commentedon Mar 10, 2026
Same issue on the Windows Codex app.
I want to know why this happened and how to deal with this issue.
bLightZP commentedon Mar 10, 2026
Same here, codex wrote the report:
Bug Report
apply_patchfails consistently on Windows Codex desktop, even for trivial add-file patches in a writable workspace.Environment
OpenAI.Codex_26.306.996.0_x64C:\Git\Gameworkspace-writeWhat I tested
apply_patchreturned exit code1Why this looks like a Codex bug
HEADand tracked filesgit apply --check tmp\apply_patch_git_probe.diffSo patch content is valid, and filesystem permissions are not the issue.
Additional observations
apply_patchExpected
apply_patchshould create or modify files in the writable workspaceActual
apply_patchfails immediately with exit code1and no actionable error outputetraut-openai commentedon Mar 10, 2026
Thanks for the bug report. This is a known issue. See #14196. We already have a fix in place, and a new version should be out shortly.
jpakkanen commentedon Mar 11, 2026
If anyone is too impatient to wait for a fix, a workaround for this would be to grant read access for your logged in user in ACL of folder
C:\Program Files\WindowsApps\OpenAI.Codex_xxxxx (xxxxx being the version number).
Both rg.exe and apply_patch started working after I did this.
AmazingTurtle commentedon Mar 26, 2026
I am suddenly seeing the same issue on codex 0.116. It started happening yesterday, out of nowhere, without me doing an update. I was surprised how the sandbox can suddenly misbehave.
balex25 commentedon Mar 27, 2026
Still no fixed, files with over 1k lines always get rejected!
xiaoliziawa commentedon Mar 28, 2026
This serious issue still persists in the latest version of Codex! I've lost all patience. Every time it fails, it clears my files! Then Codex starts to recover bit by bit. Isn't this a waste of my tokens?
devcll commentedon Mar 30, 2026
Same issues on codex cli on linux.
The codex cli version is
0.117.0.AmazingTurtle commentedon Mar 31, 2026
@etraut-openai have you noticed that there is a regression? Even on a fresh and clean windows 11 install I frequently see "Failed to apply patch", only giving it Full Access helps. Other than that, most of the time it works around with powershell CLI tools to apply the changes but only after discovering that apply_patch failed; costs lots of tokens and time
etraut-openai commentedon Mar 31, 2026
@AmazingTurtle, this issue was fixed and closed a few weeks ago. If you're seeing a similar behavior or believe that there's a regression, please open a new bug report with details requested in the bug template.