Avoid Windows apply_patch command line limit

This commit is contained in:
David Wiesen
2026-04-08 10:08:33 -07:00
parent 06d88b7e81
commit 83aa9cd9cb
4 changed files with 94 additions and 18 deletions
+5
View File
@@ -39,6 +39,11 @@ pub const APPLY_PATCH_TOOL_INSTRUCTIONS: &str = include_str!("../apply_patch_too
/// dispatcher.
pub const CODEX_CORE_APPLY_PATCH_ARG1: &str = "--codex-run-as-apply-patch";
/// Variant of [`CODEX_CORE_APPLY_PATCH_ARG1`] where argv[2] is a UTF-8 path to
/// the patch payload. This avoids Windows command-line length limits for large
/// patches while keeping the hidden self-invocation contract explicit.
pub const CODEX_CORE_APPLY_PATCH_FILE_ARG1: &str = "--codex-run-as-apply-patch-file";
#[derive(Debug, Error, PartialEq)]
pub enum ApplyPatchError {
#[error(transparent)]