Skip to content

5.3 apply_patch fails under sandboxed default permission on Windows #13574

@EarzuChan

Description

@EarzuChan

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

  1. Try creating a file via apply_patch:
    • Add File: ap_test_create.txt
    • content: apply_patch create test
  2. Try updating an existing file via apply_patch:
    • Update File: daipaibulaodi.ja.md
    • replace first line with another line
  3. (Control) Try deleting the not-created file:
    • Delete File: ap_test_create.txt

Expected Behavior

  • In workspace-write, Add File and Update File should succeed in workspace paths.
  • If blocked, the tool should return a clear permission/validation error.

Actual Behavior

  • Add File: Exit code 1, empty output
  • Update File: Exit code 1, empty output
  • Delete 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?

  1. Create a new folder and add a file with a few lines of content

  2. Ask 5.3-codex to modify the file under the default permission mode

  3. Observe the "Refused" error on the UI

What is the expected behavior?

The file should be edited properly

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions