[Linux] apply_patch can create files but cannot update existing files (fs sandbox helper status 182)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What issue are you seeing?
In a Codex workspace on Linux, apply_patch can create a new file but fails when updating that file or another existing file:
fs sandbox helper failed with status exit status: 182
This started today after the same workflow worked during the previous two days. Restarting Codex and reopening the workspace did not resolve it.
What steps can reproduce the bug?
- In a Linux Codex workspace, run an
apply_patchoperation that creates a temporary file containingbefore. This succeeds. - Run an
apply_patchoperation that changesbeforetoafterin that file. This fails with status 182. - Restart Codex or reopen the workspace and repeat the update. It still fails.
Observed in the same workspace:
sedcan read existing files.cpcan write existing files.apply_patchcan create new files.apply_patchfails only when updating an existing file.
What is the expected behavior?
apply_patch should be able to create, update, and delete files in the workspace. Updating an existing file should complete successfully.
Additional information
- Environment: Linux (Kali), zsh.
- The failure is reproducible with a newly created file, so it does not appear to depend on repository contents.
- The error indicates a filesystem sandbox helper failure rather than a patch-content or repository error.
- Relevant documentation: https://developers.openai.com/api/docs/guides/latest-model?model=gpt-5.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure in the Linux fs sandbox helper through the apply_patch update path, using the create-then-update steps in the issue. Compare the update operation with the working create, sed, and cp cases to locate the failing boundary. Done means apply_patch can create, update, and delete files successfully in the reported workspace scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust
- Domain
- operating-systems, security, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100