fix: fix fs sandbox helper for apply_patch#18296
Merged
viyatb-oai merged 7 commits intomainfrom Apr 17, 2026
Merged
Conversation
Co-authored-by: Codex noreply@openai.com
…andbox-apply-patch # Conflicts: # codex-rs/core/src/codex.rs
Co-authored-by: Codex noreply@openai.com
…andbox-apply-patch
…andbox-apply-patch
Co-authored-by: Codex <noreply@openai.com>
…andbox-apply-patch # Conflicts: # codex-rs/exec-server/src/fs_sandbox.rs
starr-openai
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root Cause
d626dc38950fb40a1a5ad0a8ffab2485e3348c53routed exec-server filesystem operations through a sandboxed helper. That path forwarded legacy Landlock into a helper policy shape that could require direct split-policy enforcement. Sandboxedapply_patchhit that edge through the filesystem abstraction.The same 0.121 edit-regression path is consistent with #18354: normal writes route through the
apply_patchfilesystem helper, fail under sandbox, and then surface the generic retry-without-sandbox prompt.Fixes #18069
Fixes #18354
Validation
cd codex-rs && just fmtorigin/mainand dropping the now-separate PATH fix:cd codex-rs && cargo test -p codex-exec-servercd codex-rs && cargo test -p codex-core file_system_sandbox_contextcd codex-rs && just fix -p codex-exec-servercd codex-rs && just fix -p codex-coregit diff --checkcd codex-rs && cargo clean