FreeBSD: apply_patch can create files but update/delete fail because filesystem sandbox cannot be enforced
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
Summary
On FreeBSD 14.4, the built-in apply_patch tool can create a new file, but it cannot update or delete an existing file. Update and delete fail during patch verification with:
apply_patch verification failed: Failed to read file to update /usr/home/codex/nrt-cli/.codex-apply-patch-probe: filesystem sandbox cannot be enforced on this executor
For delete:
apply_patch verification failed: Failed to read /usr/home/codex/nrt-cli/.codex-apply-patch-probe: filesystem sandbox cannot be enforced on this executor
Environment
- OS: FreeBSD 14.4-RELEASE-p9 amd64
- Filesystem: local UFS (
/dev/da0a), not NFS - Codex CLI: reproduced on
0.149.0_1and again after updating to0.153.4 - Package: FreeBSD binary package
misc/codex - Workspace:
/usr/home/codex/nrt-cli - Home: canonical
/usr/home/codex /homeis a system symlink tousr/home, but neither the configured home nor workspace path uses that symlink- Workspace owner:
codex:codex - Project trust:
trusted - Execution mode: Codex desktop remote app-server / code-mode host with managed workspace-write permissions
Reproduction
- Start Codex with a trusted workspace on local UFS.
- Apply an Add File patch:
*** Begin Patch
*** Add File: .codex-apply-patch-probe
+create-ok
*** End Patch
This succeeds and creates the file.
- Apply an Update File patch:
*** Begin Patch
*** Update File: .codex-apply-patch-probe
@@
-create-ok
+update-ok
*** End Patch
This fails with filesystem sandbox cannot be enforced on this executor.
- Apply a Delete File patch:
*** Begin Patch
*** Delete File: .codex-apply-patch-probe
*** End Patch
This fails with the same error.
Expected behavior
Add, update, and delete operations all work for files inside the configured writable workspace.
Troubleshooting already performed
- Completely terminated all running Codex processes before restarting.
- Recreated
~/.codexfrom scratch. - Changed the account home to the canonical non-symlink path
/usr/home/codex. - Confirmed the workspace resolves directly to
/usr/home/codex/nrt-cli. - Confirmed correct ownership and permissions.
- Confirmed the project is marked trusted.
- Updated Codex from 0.149.0_1 to 0.153.4 and reproduced again.
- Shell-based reads, writes, and deletion in the same workspace work normally.
Additional evidence
The app-server log records the failure in codex_core::tools::router:
ERROR codex_core::tools::router: error=apply_patch verification failed: Failed to read file to update /usr/home/codex/nrt-cli/.codex-apply-patch-probe: filesystem sandbox cannot be enforced on this executor
The asymmetry suggests that creation does not require the same pre-read verification path, while update/delete invoke a filesystem sandbox helper that is unavailable or considered unenforceable on the FreeBSD executor.
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 in the codex_core::tools::router apply_patch verification path described by the app-server log, then compare how Add File differs from Update File and Delete File on the FreeBSD executor. Reproduce the three operations in the reported workspace and verify that creation, update, and deletion all work without the filesystem sandbox error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100