From 1121fd8490b8cfd8e95901aaac8cef2526c7da23 Mon Sep 17 00:00:00 2001 From: starr-openai Date: Fri, 3 Apr 2026 18:48:43 -0700 Subject: [PATCH] codex: keep local apply_patch verification on host fs --- codex-rs/core/src/tools/handlers/apply_patch.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/tools/handlers/apply_patch.rs b/codex-rs/core/src/tools/handlers/apply_patch.rs index beb2794e6f..195e67eb95 100644 --- a/codex-rs/core/src/tools/handlers/apply_patch.rs +++ b/codex-rs/core/src/tools/handlers/apply_patch.rs @@ -352,8 +352,12 @@ async fn parse_apply_patch_verified( command: &[String], cwd: &Path, ) -> codex_apply_patch::MaybeApplyPatchVerified { - let fs = EnvironmentApplyPatchFileSystem::new(turn.environment.get_filesystem()); - codex_apply_patch::maybe_parse_apply_patch_verified_with_fs(command, cwd, &fs).await + if turn.environment.exec_server_url().is_some() { + let fs = EnvironmentApplyPatchFileSystem::new(turn.environment.get_filesystem()); + codex_apply_patch::maybe_parse_apply_patch_verified_with_fs(command, cwd, &fs).await + } else { + codex_apply_patch::maybe_parse_apply_patch_verified(command, cwd) + } } #[cfg(test)]