From 5962165d77e7b3c8050bfec0bce39f8c82c62dcc Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Mon, 22 Dec 2025 10:17:45 -0800 Subject: [PATCH 01/11] Add image support for exec resume --- codex-rs/exec/src/cli.rs | 18 ++++++++++- codex-rs/exec/src/lib.rs | 1 + codex-rs/exec/tests/suite/resume.rs | 47 +++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/codex-rs/exec/src/cli.rs b/codex-rs/exec/src/cli.rs index 392ebb0cd6d8..dfb750753415 100644 --- a/codex-rs/exec/src/cli.rs +++ b/codex-rs/exec/src/cli.rs @@ -11,7 +11,13 @@ pub struct Cli { pub command: Option, /// Optional image(s) to attach to the initial prompt. - #[arg(long = "image", short = 'i', value_name = "FILE", value_delimiter = ',', num_args = 1..)] + #[arg( + long = "image", + short = 'i', + value_name = "FILE", + value_delimiter = ',', + num_args = 1 + )] pub images: Vec, /// Model the agent should use. @@ -107,6 +113,16 @@ pub struct ResumeArgs { #[arg(long = "last", default_value_t = false)] pub last: bool, + /// Optional image(s) to attach to the prompt sent after resuming. + #[arg( + long = "image", + short = 'i', + value_name = "FILE", + value_delimiter = ',', + num_args = 1 + )] + pub images: Vec, + /// Prompt to send after resuming the session. If `-` is used, read from stdin. #[arg(value_name = "PROMPT", value_hint = clap::ValueHint::Other)] pub prompt: Option, diff --git a/codex-rs/exec/src/lib.rs b/codex-rs/exec/src/lib.rs index 93a481b630e2..701c7b7972be 100644 --- a/codex-rs/exec/src/lib.rs +++ b/codex-rs/exec/src/lib.rs @@ -335,6 +335,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any let prompt_text = resolve_prompt(prompt_arg); let mut items: Vec = imgs .into_iter() + .chain(args.images.into_iter()) .map(|path| UserInput::LocalImage { path }) .collect(); items.push(UserInput::Text { diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs index e37b38606a2f..76baf72104e5 100644 --- a/codex-rs/exec/tests/suite/resume.rs +++ b/codex-rs/exec/tests/suite/resume.rs @@ -309,3 +309,50 @@ fn exec_resume_preserves_cli_configuration_overrides() -> anyhow::Result<()> { assert!(content.contains(&marker2)); Ok(()) } + +#[test] +fn exec_resume_accepts_images_after_subcommand() -> anyhow::Result<()> { + let test = test_codex_exec(); + let fixture = + Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/cli_responses_fixture.sse"); + + let marker = format!("resume-image-{}", Uuid::new_v4()); + let prompt = format!("echo {marker}"); + + test.cmd() + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg(&prompt) + .assert() + .success(); + + let image_path = test.cwd_path().join("resume_image.png"); + let image_bytes: &[u8] = &[ + 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, + 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, + 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9C, 0x63, 0x00, + 0x01, 0x00, 0x00, 0x05, 0x00, 0x01, 0x0D, 0x0A, 0x2D, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82, + ]; + std::fs::write(&image_path, image_bytes)?; + + let prompt2 = format!("echo resume-image-2-{}", Uuid::new_v4()); + test.cmd() + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg("resume") + .arg("--last") + .arg("--image") + .arg(&image_path) + .arg(&prompt2) + .assert() + .success(); + + Ok(()) +} From 4b368a85fd46189ab70ee06394652a1e2511910c Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Mon, 22 Dec 2025 11:57:01 -0800 Subject: [PATCH 02/11] Clarify exec image usage --- codex-rs/exec/tests/suite/resume.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs index 76baf72104e5..35a214229926 100644 --- a/codex-rs/exec/tests/suite/resume.rs +++ b/codex-rs/exec/tests/suite/resume.rs @@ -330,6 +330,7 @@ fn exec_resume_accepts_images_after_subcommand() -> anyhow::Result<()> { .success(); let image_path = test.cwd_path().join("resume_image.png"); + let image_path_2 = test.cwd_path().join("resume_image_2.png"); let image_bytes: &[u8] = &[ 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, @@ -338,6 +339,7 @@ fn exec_resume_accepts_images_after_subcommand() -> anyhow::Result<()> { 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82, ]; std::fs::write(&image_path, image_bytes)?; + std::fs::write(&image_path_2, image_bytes)?; let prompt2 = format!("echo resume-image-2-{}", Uuid::new_v4()); test.cmd() @@ -350,6 +352,8 @@ fn exec_resume_accepts_images_after_subcommand() -> anyhow::Result<()> { .arg("--last") .arg("--image") .arg(&image_path) + .arg("--image") + .arg(&image_path_2) .arg(&prompt2) .assert() .success(); From acb5e82935cccc3076b77d0afe13f7ac5931c385 Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Mon, 22 Dec 2025 11:57:08 -0800 Subject: [PATCH 03/11] Restore exec image arg flexibility --- codex-rs/exec/src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/exec/src/cli.rs b/codex-rs/exec/src/cli.rs index dfb750753415..158b58c2a840 100644 --- a/codex-rs/exec/src/cli.rs +++ b/codex-rs/exec/src/cli.rs @@ -16,7 +16,7 @@ pub struct Cli { short = 'i', value_name = "FILE", value_delimiter = ',', - num_args = 1 + num_args = 1.. )] pub images: Vec, From 779d2af59feb79e774f6b49ec80e107ce27c3ebc Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Mon, 22 Dec 2025 11:57:18 -0800 Subject: [PATCH 04/11] Assert resume images reach model --- codex-rs/exec/tests/suite/resume.rs | 46 ++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs index 35a214229926..0c71ec6792ac 100644 --- a/codex-rs/exec/tests/suite/resume.rs +++ b/codex-rs/exec/tests/suite/resume.rs @@ -1,6 +1,7 @@ #![allow(clippy::unwrap_used, clippy::expect_used)] use anyhow::Context; use core_test_support::test_codex_exec::test_codex_exec; +use pretty_assertions::assert_eq; use serde_json::Value; use std::path::Path; use std::string::ToString; @@ -69,6 +70,39 @@ fn extract_conversation_id(path: &std::path::Path) -> String { .to_string() } +fn last_user_image_count(path: &std::path::Path) -> usize { + let content = std::fs::read_to_string(path).unwrap_or_default(); + let mut last_count = 0; + for line in content.lines() { + if line.trim().is_empty() { + continue; + } + let Ok(item): Result = serde_json::from_str(line) else { + continue; + }; + if item.get("type").and_then(|t| t.as_str()) != Some("response_item") { + continue; + } + let Some(payload) = item.get("payload") else { + continue; + }; + if payload.get("type").and_then(|t| t.as_str()) != Some("message") { + continue; + } + if payload.get("role").and_then(|r| r.as_str()) != Some("user") { + continue; + } + let Some(content_items) = payload.get("content").and_then(|v| v.as_array()) else { + continue; + }; + last_count = content_items + .iter() + .filter(|entry| entry.get("type").and_then(|t| t.as_str()) == Some("input_image")) + .count(); + } + last_count +} + #[test] fn exec_resume_last_appends_to_existing_file() -> anyhow::Result<()> { let test = test_codex_exec(); @@ -341,7 +375,8 @@ fn exec_resume_accepts_images_after_subcommand() -> anyhow::Result<()> { std::fs::write(&image_path, image_bytes)?; std::fs::write(&image_path_2, image_bytes)?; - let prompt2 = format!("echo resume-image-2-{}", Uuid::new_v4()); + let marker2 = format!("resume-image-2-{}", Uuid::new_v4()); + let prompt2 = format!("echo {marker2}"); test.cmd() .env("CODEX_RS_SSE_FIXTURE", &fixture) .env("OPENAI_BASE_URL", "http://unused.local") @@ -358,5 +393,14 @@ fn exec_resume_accepts_images_after_subcommand() -> anyhow::Result<()> { .assert() .success(); + let sessions_dir = test.home_path().join("sessions"); + let resumed_path = find_session_file_containing_marker(&sessions_dir, &marker2) + .expect("no session file found after resume with images"); + let image_count = last_user_image_count(&resumed_path); + assert_eq!( + image_count, 2, + "resume prompt should include both attached images" + ); + Ok(()) } From 6c491b8602d78f0a6d86c556a77c8320477025b1 Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Fri, 2 Jan 2026 13:26:47 -0800 Subject: [PATCH 05/11] Use PR linux binary in npm staging --- .github/workflows/ci.yml | 15 +++++++++++++++ scripts/stage_npm_packages.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd2e5131af25..95bab38bc5a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,20 @@ jobs: # stage_npm_packages.py requires DotSlash when staging releases. - uses: facebook/install-dotslash@v2 + - uses: dtolnay/rust-toolchain@1.90 + with: + targets: x86_64-unknown-linux-musl + + - name: Build Linux native binary for npm staging + run: | + set -euo pipefail + sudo apt-get update + sudo apt-get install -y musl-tools zstd + cargo build --manifest-path codex-rs/Cargo.toml --target x86_64-unknown-linux-musl --release -p codex --bin codex + OVERLAY_DIR="${RUNNER_TEMP}/codex-npm-overlay/vendor/x86_64-unknown-linux-musl/codex" + mkdir -p "$OVERLAY_DIR" + cp codex-rs/target/x86_64-unknown-linux-musl/release/codex "$OVERLAY_DIR/codex" + - name: Stage npm package id: stage_npm_package env: @@ -42,6 +56,7 @@ jobs: python3 ./scripts/stage_npm_packages.py \ --release-version "$CODEX_VERSION" \ --package codex \ + --overlay-vendor-src "${RUNNER_TEMP}/codex-npm-overlay/vendor" \ --output-dir "$OUTPUT_DIR" PACK_OUTPUT="${OUTPUT_DIR}/codex-npm-${CODEX_VERSION}.tgz" echo "pack_output=$PACK_OUTPUT" >> "$GITHUB_OUTPUT" diff --git a/scripts/stage_npm_packages.py b/scripts/stage_npm_packages.py index f87a75815fae..a6627b1856bb 100755 --- a/scripts/stage_npm_packages.py +++ b/scripts/stage_npm_packages.py @@ -52,6 +52,11 @@ def parse_args() -> argparse.Namespace: default=None, help="Directory where npm tarballs should be written (default: dist/npm).", ) + parser.add_argument( + "--overlay-vendor-src", + type=Path, + help="Optional vendor directory to overlay onto downloaded native artifacts.", + ) parser.add_argument( "--keep-staging-dirs", action="store_true", @@ -120,6 +125,23 @@ def run_command(cmd: list[str]) -> None: subprocess.run(cmd, cwd=REPO_ROOT, check=True) +def overlay_vendor_dir(src: Path, dest: Path) -> None: + src = src.resolve() + if not src.exists(): + raise RuntimeError(f"Overlay vendor source not found: {src}") + + for path in src.rglob("*"): + rel_path = path.relative_to(src) + dest_path = dest / rel_path + if path.is_dir(): + dest_path.mkdir(parents=True, exist_ok=True) + continue + if dest_path.exists(): + dest_path.unlink() + dest_path.parent.mkdir(parents=True, exist_ok=True) + shutil.copy2(path, dest_path) + + def main() -> int: args = parse_args() @@ -134,6 +156,7 @@ def main() -> int: vendor_temp_root: Path | None = None vendor_src: Path | None = None resolved_head_sha: str | None = None + overlay_vendor_src = args.overlay_vendor_src.resolve() if args.overlay_vendor_src else None final_messsages = [] @@ -146,6 +169,12 @@ def main() -> int: install_native_components(workflow_url, native_components, vendor_temp_root) vendor_src = vendor_temp_root / "vendor" + if overlay_vendor_src is not None: + if vendor_src is None: + vendor_src = overlay_vendor_src + else: + overlay_vendor_dir(overlay_vendor_src, vendor_src) + if resolved_head_sha: print(f"should `git checkout {resolved_head_sha}`") From 4639f3b24a33dbd703af8bc8d07c9bc9af1c3a84 Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Fri, 2 Jan 2026 13:50:02 -0800 Subject: [PATCH 06/11] fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95bab38bc5a3..8ec08a4d2c93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: set -euo pipefail sudo apt-get update sudo apt-get install -y musl-tools zstd - cargo build --manifest-path codex-rs/Cargo.toml --target x86_64-unknown-linux-musl --release -p codex --bin codex + cargo build --manifest-path codex-rs/Cargo.toml --target x86_64-unknown-linux-musl --release -p codex-cli --bin codex OVERLAY_DIR="${RUNNER_TEMP}/codex-npm-overlay/vendor/x86_64-unknown-linux-musl/codex" mkdir -p "$OVERLAY_DIR" cp codex-rs/target/x86_64-unknown-linux-musl/release/codex "$OVERLAY_DIR/codex" From 3b50d08b24f3424b046f2699eef54d4915851b11 Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Fri, 2 Jan 2026 14:36:12 -0800 Subject: [PATCH 07/11] increase timeout --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ec08a4d2c93..8391fc617a10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: build-test: runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 30 env: NODE_OPTIONS: --max-old-space-size=4096 steps: From d6c415b84e809005d5adbaa24b1f9da254a7613b Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Fri, 2 Jan 2026 15:24:59 -0800 Subject: [PATCH 08/11] support more flags for resume --- codex-rs/exec/src/cli.rs | 14 +++++-- codex-rs/exec/tests/suite/resume.rs | 64 +++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/codex-rs/exec/src/cli.rs b/codex-rs/exec/src/cli.rs index 158b58c2a840..8cff14f929ae 100644 --- a/codex-rs/exec/src/cli.rs +++ b/codex-rs/exec/src/cli.rs @@ -21,7 +21,7 @@ pub struct Cli { pub images: Vec, /// Model the agent should use. - #[arg(long, short = 'm')] + #[arg(long, short = 'm', global = true)] pub model: Option, /// Use open-source provider. @@ -43,7 +43,7 @@ pub struct Cli { pub config_profile: Option, /// Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write). - #[arg(long = "full-auto", default_value_t = false)] + #[arg(long = "full-auto", default_value_t = false, global = true)] pub full_auto: bool, /// Skip all confirmation prompts and execute commands without sandboxing. @@ -52,6 +52,7 @@ pub struct Cli { long = "dangerously-bypass-approvals-and-sandbox", alias = "yolo", default_value_t = false, + global = true, conflicts_with = "full_auto" )] pub dangerously_bypass_approvals_and_sandbox: bool, @@ -61,7 +62,7 @@ pub struct Cli { pub cwd: Option, /// Allow running Codex outside a Git repository. - #[arg(long = "skip-git-repo-check", default_value_t = false)] + #[arg(long = "skip-git-repo-check", global = true, default_value_t = false)] pub skip_git_repo_check: bool, /// Additional directories that should be writable alongside the primary workspace. @@ -80,7 +81,12 @@ pub struct Cli { pub color: Color, /// Print events to stdout as JSONL. - #[arg(long = "json", alias = "experimental-json", default_value_t = false)] + #[arg( + long = "json", + alias = "experimental-json", + default_value_t = false, + global = true + )] pub json: bool, /// Specifies file where the last message from the agent should be written. diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs index 0c71ec6792ac..1b36770706ce 100644 --- a/codex-rs/exec/tests/suite/resume.rs +++ b/codex-rs/exec/tests/suite/resume.rs @@ -211,6 +211,70 @@ fn exec_resume_last_accepts_prompt_after_flag_in_json_mode() -> anyhow::Result<( Ok(()) } +#[test] +fn exec_resume_allows_skip_git_repo_check_after_subcommand() -> anyhow::Result<()> { + let test = test_codex_exec(); + let fixture = + Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/cli_responses_fixture.sse"); + + // First run to create a session file in the temp CODEX_HOME. + test.cmd() + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("echo bootstrap-resume-session") + .assert() + .success(); + + // Resume using --skip-git-repo-check after the subcommand to ensure it is accepted. + test.cmd() + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("resume") + .arg("--last") + .arg("--skip-git-repo-check") + .arg("echo resume-session-with-skip-after-subcommand") + .assert() + .success(); + + Ok(()) +} + +#[test] +fn exec_resume_accepts_global_flags_after_subcommand() -> anyhow::Result<()> { + let test = test_codex_exec(); + let fixture = + Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/cli_responses_fixture.sse"); + + // Seed a session. + test.cmd() + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("echo seed-resume-session") + .assert() + .success(); + + // Resume while passing global flags after the subcommand to ensure clap accepts them. + test.cmd() + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("resume") + .arg("--last") + .arg("--json") + .arg("--model") + .arg("gpt-5.2-codex") + .arg("--config") + .arg("reasoning_level=xhigh") + .arg("--dangerously-bypass-approvals-and-sandbox") + .arg("--skip-git-repo-check") + .arg("echo resume-with-global-flags-after-subcommand") + .assert() + .success(); + + Ok(()) +} + #[test] fn exec_resume_by_id_appends_to_existing_file() -> anyhow::Result<()> { let test = test_codex_exec(); From 722b4a3b29ae8815137ea85d3688836b92661928 Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Mon, 5 Jan 2026 13:23:53 -0800 Subject: [PATCH 09/11] revert ci changes --- .github/workflows/ci.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8391fc617a10..fd2e5131af25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: build-test: runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 10 env: NODE_OPTIONS: --max-old-space-size=4096 steps: @@ -30,20 +30,6 @@ jobs: # stage_npm_packages.py requires DotSlash when staging releases. - uses: facebook/install-dotslash@v2 - - uses: dtolnay/rust-toolchain@1.90 - with: - targets: x86_64-unknown-linux-musl - - - name: Build Linux native binary for npm staging - run: | - set -euo pipefail - sudo apt-get update - sudo apt-get install -y musl-tools zstd - cargo build --manifest-path codex-rs/Cargo.toml --target x86_64-unknown-linux-musl --release -p codex-cli --bin codex - OVERLAY_DIR="${RUNNER_TEMP}/codex-npm-overlay/vendor/x86_64-unknown-linux-musl/codex" - mkdir -p "$OVERLAY_DIR" - cp codex-rs/target/x86_64-unknown-linux-musl/release/codex "$OVERLAY_DIR/codex" - - name: Stage npm package id: stage_npm_package env: @@ -56,7 +42,6 @@ jobs: python3 ./scripts/stage_npm_packages.py \ --release-version "$CODEX_VERSION" \ --package codex \ - --overlay-vendor-src "${RUNNER_TEMP}/codex-npm-overlay/vendor" \ --output-dir "$OUTPUT_DIR" PACK_OUTPUT="${OUTPUT_DIR}/codex-npm-${CODEX_VERSION}.tgz" echo "pack_output=$PACK_OUTPUT" >> "$GITHUB_OUTPUT" From 6aa45bd674982ba75f8510e2714bbafed2ce573f Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Mon, 5 Jan 2026 13:27:07 -0800 Subject: [PATCH 10/11] cleanup --- scripts/stage_npm_packages.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/scripts/stage_npm_packages.py b/scripts/stage_npm_packages.py index a6627b1856bb..f87a75815fae 100755 --- a/scripts/stage_npm_packages.py +++ b/scripts/stage_npm_packages.py @@ -52,11 +52,6 @@ def parse_args() -> argparse.Namespace: default=None, help="Directory where npm tarballs should be written (default: dist/npm).", ) - parser.add_argument( - "--overlay-vendor-src", - type=Path, - help="Optional vendor directory to overlay onto downloaded native artifacts.", - ) parser.add_argument( "--keep-staging-dirs", action="store_true", @@ -125,23 +120,6 @@ def run_command(cmd: list[str]) -> None: subprocess.run(cmd, cwd=REPO_ROOT, check=True) -def overlay_vendor_dir(src: Path, dest: Path) -> None: - src = src.resolve() - if not src.exists(): - raise RuntimeError(f"Overlay vendor source not found: {src}") - - for path in src.rglob("*"): - rel_path = path.relative_to(src) - dest_path = dest / rel_path - if path.is_dir(): - dest_path.mkdir(parents=True, exist_ok=True) - continue - if dest_path.exists(): - dest_path.unlink() - dest_path.parent.mkdir(parents=True, exist_ok=True) - shutil.copy2(path, dest_path) - - def main() -> int: args = parse_args() @@ -156,7 +134,6 @@ def main() -> int: vendor_temp_root: Path | None = None vendor_src: Path | None = None resolved_head_sha: str | None = None - overlay_vendor_src = args.overlay_vendor_src.resolve() if args.overlay_vendor_src else None final_messsages = [] @@ -169,12 +146,6 @@ def main() -> int: install_native_components(workflow_url, native_components, vendor_temp_root) vendor_src = vendor_temp_root / "vendor" - if overlay_vendor_src is not None: - if vendor_src is None: - vendor_src = overlay_vendor_src - else: - overlay_vendor_dir(overlay_vendor_src, vendor_src) - if resolved_head_sha: print(f"should `git checkout {resolved_head_sha}`") From be517599a8c93adf23aca7214d77b3c37a320c03 Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Mon, 5 Jan 2026 13:42:10 -0800 Subject: [PATCH 11/11] remove redundant test --- codex-rs/exec/tests/suite/resume.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs index 1b36770706ce..b6b750dc3e14 100644 --- a/codex-rs/exec/tests/suite/resume.rs +++ b/codex-rs/exec/tests/suite/resume.rs @@ -211,35 +211,6 @@ fn exec_resume_last_accepts_prompt_after_flag_in_json_mode() -> anyhow::Result<( Ok(()) } -#[test] -fn exec_resume_allows_skip_git_repo_check_after_subcommand() -> anyhow::Result<()> { - let test = test_codex_exec(); - let fixture = - Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/cli_responses_fixture.sse"); - - // First run to create a session file in the temp CODEX_HOME. - test.cmd() - .env("CODEX_RS_SSE_FIXTURE", &fixture) - .env("OPENAI_BASE_URL", "http://unused.local") - .arg("--skip-git-repo-check") - .arg("echo bootstrap-resume-session") - .assert() - .success(); - - // Resume using --skip-git-repo-check after the subcommand to ensure it is accepted. - test.cmd() - .env("CODEX_RS_SSE_FIXTURE", &fixture) - .env("OPENAI_BASE_URL", "http://unused.local") - .arg("resume") - .arg("--last") - .arg("--skip-git-repo-check") - .arg("echo resume-session-with-skip-after-subcommand") - .assert() - .success(); - - Ok(()) -} - #[test] fn exec_resume_accepts_global_flags_after_subcommand() -> anyhow::Result<()> { let test = test_codex_exec();