From 170e1b0c078d0db64cf3deadd4d5f21e86d7fdcf Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Wed, 18 Nov 2026 20:45:18 -0800 Subject: [PATCH] feat(runner): pin Codex 0.170.0 and Agent SDK 0.3.328 so Fable 5.2 and GPT-6.2 run (#22278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Paperclip Runner runs Claude and Codex agents from one shared provider pack. The pack pins an exact Claude Agent SDK (which bundles Claude Code) and an exact Codex CLI. > - #22222 added Claude Fable 5.2 (minimum Claude Code 2.1.321) and GPT-6.2 Sol and Astra (minimum Codex 0.169.1). The pack still bundles Claude Code 2.1.286 and Codex 0.160.0. > - Because of this, Paperclip Runner stops these models with a named version error, and native remote Codex accepts only `>=0.149.0 <0.161.0`. > - This pull request moves the provider pack to Agent SDK 0.3.328 (Claude Code 2.1.328) and Codex 0.170.0. It moves every constant that depends on these pins, and the remote Codex window to `<0.171.0`. > - The benefit is that Fable 5.2 and GPT-6.2 run on Paperclip Runner after a sandbox image with this pack is promoted. ## Linked Issues or Issue Description Refs #22222 (adds the models and the version floors; this pull request makes them runnable on Paperclip Runner). Refs #18488 (moves only the Codex pin to 0.166.0 and the window to `<0.167.0`; it is not updated since November 1 and has conflicts with `master`). Refs #18486 (GPT-6.1 Terra needs Codex 0.165.0; Codex 0.170.0 satisfies it). **Overlap with #18488.** #18488 changes the same Codex pin locations. This pull request uses a newer pin (0.170.0) and also moves the Claude runtime. If this pull request merges first, #18488 has no remaining change. I did not change the #18488 branch. ## What Changed - Claude runtime: `@anthropic-ai/claude-agent-sdk` 0.3.286 → 0.3.328 (Claude Code 2.1.286 → 2.1.328). This changes the root `pnpm.overrides`, `pnpm-workspace.yaml`, the ACPX `claude` profile, and the qualified Claude runtime in `installation-integrity.ts`, with new executable digests for Linux x64, Linux ARM64, macOS ARM64, and macOS x64. - Codex runtime: `@openai/codex` 0.160.0 → 0.170.0. This changes the runner dependency, the `codex-acp@1.6.2>@openai/codex` override, the `codex-acp` patch dependency line, the ACPX `codex` profile, and the qualified Linux x64 runtime with its new executable digest. - The ACP bridges do not change: `claude-agent-acp` 0.73.0 and the patched `codex-acp` 1.6.2. Their `commandDigest` values and profile versions do not change. - Generated declarations: `generated-profiles.ts` and `generated_acpx_profiles.rs` are regenerated with `generate:acpx-profiles`. - Remote native Codex window: `REMOTE_CODEX_MAXIMUM_VERSION_EXCLUSIVE` 0.161.0 → 0.171.0. The minimum stays at 0.149.0. Images with Codex 0.149.0 through 0.170.x are accepted. - Codex company observability: the qualified-version check moves to `codex-cli 0.170.0`. The `otel` configuration keys that Paperclip writes (`exporter`, `trace_exporter`, `metrics_exporter`) are present in the 0.170.0 configuration schema. The `OtelExporterKind`, `OtelHttpProtocol`, and `OtelTlsConfig` definitions are identical to 0.160.0. - Daytona runner image probes (`Dockerfile`, `Dockerfile.release`) expect `codex-cli 0.170.0` and `2.1.328 (Claude Code)`. The remote npm install spec in `server/src/adapters/registry.ts` is `@openai/codex@0.170.0`. - Tests: fixtures and assertions that mirror the pins use the new versions. The window tests accept 0.161.0 through 0.170.99 and reject 0.171.0. The ACPX gate tests now show that Fable 5.2 and GPT-6.2 are admitted. A new test mocks an older bundled runtime and keeps the named version-gap errors covered. The fallback test shows that GPT-6.2 stays on 0.170.0 and still falls back on 0.160.0. - Opt-in qualification scripts (`scripts/tests/native-cleanup-paginated-codex.mjs`, `native-provider-startup-codex.mjs`) require Codex 0.170.0. - Documentation: `docker/daytona-runner/README.md`, `doc/architecture/paperclip-runner-compatibility.md`, `doc/agent-observability.md`, `docs/deploy/environment-variables.md`, and the deferred item in `doc/adapter-model-audit-2026-11-18.md`. - `pnpm-lock.yaml` is not part of this pull request. The refresh bot regenerates it on `master`, as for the previous pin refreshes (#14942, #14993). ## Verification Sources, checked on 2026-11-19: - npm registry: `@openai/codex@0.170.0` (published 2026-11-18T03:45Z) and `@anthropic-ai/claude-agent-sdk@0.3.328` (published 2026-11-18T23:13Z, `claudeCodeVersion` 2.1.328). Both are the `latest` tags. - [Codex releases](https://github.com/openai/codex/releases) 0.161.0 through 0.170.0. The notes record no app-server protocol break. 0.169.0 keeps project configuration disabled for `codex exec` in untrusted directories; Paperclip's CLI path already uses `--skip-git-repo-check`, and the native path uses `app-server`. - [Claude Code changelog](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md) 2.1.287 through 2.1.328. See "Risks" for the headless changes that I reviewed. Digests and package shape: - I downloaded each platform archive with `npm pack`, which verifies registry integrity, and computed the SHA-256 of the executable. As a method check, the same command on the 0.3.286 Linux x64 archive gives the digest that is on `master` (`fe503f65…`). The Codex 0.160.0 archive also gives the `master` digest (`12eb3e81…`). - The extracted executables report `codex-cli 0.170.0` and `2.1.328 (Claude Code)`. - The Codex 0.170.0 Linux x64 archive no longer contains `codex-resources/zsh/bin/zsh`. Paperclip does not reference that path. - The Agent SDK 0.3.328 `optionalDependencies` have the same platform set as 0.3.286. The Codex 0.170.0 `optionalDependencies` use the same `npm:@openai/codex@-` aliases. - Bridge link check: I installed `@agentclientprotocol/claude-agent-acp@0.73.0` with an override to Agent SDK 0.3.328 and imported its entry module. Node linked all of the named SDK imports, and the import completed. Real Codex qualification (no model turn, no credentials): - `PAPERCLIP_TEST_CODEX_BINARY= node --import ./server/node_modules/tsx/dist/loader.mjs scripts/tests/native-cleanup-paginated-codex.mjs` passed: `green: true`, with the expected red control and paginated `thread/resume` through the real 0.170.0 `app-server`. The installed binary digest matches the pinned digest. Focused suites (Linux x64, Node 25.9.0, local `pnpm install --no-frozen-lockfile`): - `cd packages/paperclip-runner && pnpm run typecheck:typescript` passed, including `check:acpx-profiles`. - `npx tsc --noEmit` passed in `packages/adapters/codex-local` and `packages/adapters/claude-local`. - `packages/adapters/codex-local`: 625 passed. `packages/adapters/claude-local`: 419 passed, 1 skipped. - `node --test`: `acpx-codex-package-contract` 9 passed, `controlled-evals/controller` 77 passed, `scripts/acpx-patch-packaging` 26 passed, `scripts/__tests__/grok-public-install-sandbox` 27 passed. - `server`: `acpx-qualification`, `codex-runtime-compatibility`, and `codex-model-fallback` 110 passed. `native-session-executor` 1541 passed, 1 failed. The failure (`compares export process compatibility … db.transaction is not a function`) also fails on unchanged `master` on this host. - `packages/paperclip-runner` vitest (`installation-integrity`, `qualified-profiles`, `codex-security-config`, `native-execution`, `native-backend-factory`): 283 passed, 25 failed. All 25 failures are in `installation-integrity.test.ts` with "ACPX provider lifetime guardian failed to start". The same 25 tests fail on unchanged `master` on this host (master fails 30 here). Rust (toolchain 1.97.1 from `rust-toolchain.toml`, Linux x64): - `cargo test -p paperclip-runner-core --lib`: 658 passed, 2 failed, 4 ignored. `warm_run_attachment_reuses_the_provider_ingress_listener` also fails on unchanged `master` on this host. `reaping_stops_a_dead_runners_provider_and_its_escaped_tool_job` is flaky here: on this branch it passed 2 of 3 reruns. - `cargo test -p paperclip-runner-core --test acpx_warm_attachment --test native_provider_backend`: 7 and 45 passed. - The new and changed saved-session tests pass: `a_session_saved_by_the_previous_agent_runtime_is_refused_by_name`, `unrestorable_saved_sessions_keep_strict_bindings_and_name_their_class`, and `a_settled_session_saved_by_the_previous_acpx_release_continues`. `rustfmt --check` passes. - `server`: `native-session-resume.test.ts` and `acpx-qualification.test.ts` 110 passed, 2 skipped. Both new resume cases run and pass. Not run here: - `native-provider-startup-codex.mjs`, because it needs a compiled `paperclip-runnerd`. The trusted CI runner workflow covers startup and session-resume probes. - The Docker image build and any live model turn. A live Fable 5.2 and GPT-6.2 test follows the staging image rollout. ## Saved sessions from the previous release This change keeps the ACPX bridge command digests and profile versions. It changes `agentRuntimeVersion` in the `claude` and `codex` ACPX profiles. That field is part of the saved session identity. The previous release saved sessions with Agent SDK 0.3.286 or Codex 0.160.0. This build refuses those saved sessions. It does not migrate them. - **Next run (the usual case):** the saved provider descriptor names the old runtime. `rebindNativeSessionCheckpoint` does not match it, so the next run starts a fresh provider session in the same workspace with the complete handoff prompt. No run fails. The earlier provider conversation does not carry over. - **A run in flight at the deploy (settled or mid-turn):** the runner restore refuses the saved descriptor with the permanent class `provider_state_incompatible`. The server reports it as `native_provider_state_incompatible` and stops automatic retries. The runner opens no provider and keeps the saved state bytes and the workspace. The next run on the task starts a fresh provider session. - **Native Codex (`codex_app_server`) and OpenCode** sessions do not record this field, so their resume decision does not change. After a new image is promoted, native Codex resumes a saved thread with Codex 0.170.0 instead of 0.160.0. This pull request does not test that cross-version thread resume. New tests: - `acpx_provider_backend.rs`: `a_session_saved_by_the_previous_agent_runtime_is_refused_by_name` covers settled Claude and Codex sessions and a Claude turn interrupted mid-run by the deploy. `unrestorable_saved_sessions_keep_strict_bindings_and_name_their_class` has a new `agent_runtime_release` case. Each case checks the named class, that no provider session opens, and that the saved bytes do not change. - `native-session-resume.test.ts`: "a session saved by the previous Claude or Codex ACPX runtime" checks that a same-release session resumes, and that a session saved with Agent SDK 0.3.286 or Codex 0.160.0 starts fresh in the same workspace. ## Risks - Medium. Every Paperclip Runner Claude and Codex run uses the new executables. The digests, generated profiles, image probes, and window must agree. They agree locally, and CI runs the Rust and runner suites again. - Claude Code 2.1.287 through 2.1.328 change some headless defaults. I checked each one against Paperclip: - 2.1.302: `-p` and Agent SDK sessions with no permission mode start in `default` mode on third-party providers. Paperclip always sets a mode (`bypassPermissions` or `default`), so this does not apply. - 2.1.299: MCP allow rules now match only the whole server name. Paperclip already writes `mcp____*` and exact `mcp__paperclip__` rules. - 2.1.302: fork subagents are on by default in `-p` and the Agent SDK, as in the terminal. This pull request keeps the upstream default and does not set `CLAUDE_CODE_FORK_SUBAGENT=0`. Reviewers can ask to keep them off. - 2.1.299 and later: stdio MCP connections negotiate MCP protocol 2026-07-28 first and fall back to the older protocol for servers that do not answer. - Agent SDK 0.3.328 is less than one day old. If a regression appears, revert this pull request to return to 0.3.286 and Codex 0.160.0. - Sandbox images built before this change still carry Codex 0.160.0 and Claude Code 2.1.286. They stay accepted. On those images, Fable 5.2 and GPT-6.2 keep the existing named errors and fallbacks until a new image is promoted. - Until the refresh bot updates `pnpm-lock.yaml` on `master`, a local `--frozen-lockfile` install fails, as with the previous pin refreshes. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - Anthropic Claude, model ID `claude-opus-5-5`, through Claude Code with tool use (shell, file edit, `gh`) and code execution. The context window and reasoning mode are not reported in this session. - The registry archives, digests, release notes, configuration schemas, and changelog were read directly. No model output was used as a source for those facts. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [ ] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: devinfoley <139239+devinfoley@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- doc/adapter-model-audit-2026-11-18.md | 10 ++-- doc/agent-observability.md | 4 +- .../paperclip-runner-compatibility.md | 24 ++++++--- docker/daytona-runner/Dockerfile | 4 +- docker/daytona-runner/Dockerfile.release | 4 +- docker/daytona-runner/README.md | 17 +++--- docs/deploy/environment-variables.md | 2 +- package.json | 4 +- .../adapters/claude-local/src/index.test.ts | 1 + .../codex-local/src/server/codex-home.test.ts | 2 +- .../src/server/execute.ssh-host-auth.test.ts | 2 +- .../codex-local/src/server/execute.ts | 4 +- packages/paperclip-runner/acpx-profiles.json | 4 +- packages/paperclip-runner/package.json | 2 +- .../runner-core/src/acpx_provider_backend.rs | 49 +++++++++++++++++ .../src/generated_acpx_profiles.rs | 4 +- .../runner-core/tests/acpx_warm_attachment.rs | 14 ++--- .../tests/native_provider_backend.rs | 4 +- .../controlled-evals/controller.test.mjs | 2 +- .../src/contracts/native-execution.test.ts | 4 +- .../src/drivers/acpx/generated-profiles.ts | 4 +- .../acpx/installation-integrity.test.ts | 20 +++---- .../drivers/acpx/installation-integrity.ts | 26 ++++----- .../drivers/acpx/qualified-profiles.test.ts | 4 +- .../codex/codex-security-config.test.ts | 20 +++---- .../test/acpx-codex-package-contract.test.mjs | 6 +-- ...agentclientprotocol__codex-acp@1.6.2.patch | 2 +- pnpm-workspace.yaml | 4 +- .../grok-public-install-sandbox.test.mjs | 22 ++++---- scripts/acpx-patch-packaging.test.mjs | 26 ++++----- .../tests/native-cleanup-paginated-codex.mjs | 8 +-- .../tests/native-provider-startup-codex.mjs | 4 +- .../scripts/verify-agent-commentary-live.ts | 2 +- server/src/__tests__/adapter-registry.test.ts | 2 +- .../verify-assigned-tool-results-live.ts | 2 +- server/src/adapters/registry.ts | 2 +- .../native-runtime/acpx-qualification.test.ts | 54 ++++++++++++------- .../codex-model-fallback.test.ts | 11 ++-- .../codex-runtime-compatibility.test.ts | 4 +- .../codex-runtime-compatibility.ts | 2 +- .../native-session-executor.test.ts | 36 ++++++------- .../native-session-resume.test.ts | 54 +++++++++++++++++++ .../runner-e2e/source-sdk-public-inputs.json | 2 +- 43 files changed, 307 insertions(+), 171 deletions(-) diff --git a/doc/adapter-model-audit-2026-11-18.md b/doc/adapter-model-audit-2026-11-18.md index 0ec5ff826fc..5f91f28a463 100644 --- a/doc/adapter-model-audit-2026-11-18.md +++ b/doc/adapter-model-audit-2026-11-18.md @@ -77,11 +77,11 @@ Research date: November 18, 2026. ## Deferred items -- **Provider-pack runtimes.** Codex 0.170.0, Claude Code 2.1.327 (Agent SDK - 0.3.327), and OpenCode 1.19.6 need runner qualification. Native remote Codex - accepts only `>=0.149.0 <0.161.0`, so GPT-6.2 needs that window and the - install pin to move. The deferred Claude 2.1.286 → 2.1.308 headless-default - changes from the previous audit still apply. +- **Provider-pack runtimes.** Resolved on 2026-11-19 by a follow-up pull request + that pins Codex 0.170.0 and Agent SDK 0.3.328 (Claude Code 2.1.328) and moves the + native remote Codex window to `>=0.149.0 <0.171.0`. That pull request records + the Claude 2.1.286 → 2.1.328 headless-default review. OpenCode 1.19.x still + needs its own qualification. - **Kimi Code 2.6.3.** The native Kimi profile binds 2.3.3 with a patched distribution closure. A new version needs its own qualification. - **GPT-6.1 Terra** is in the Codex catalog. [#18486](https://github.com/paperclipai/paperclip/pull/18486) diff --git a/doc/agent-observability.md b/doc/agent-observability.md index 8fd7d78036c..9b5b8b87e8c 100644 --- a/doc/agent-observability.md +++ b/doc/agent-observability.md @@ -13,8 +13,8 @@ This is separate from Paperclip's first-party Telemetry and its content-free ## Capture and supported runtimes -The qualified versions are Codex 0.160.0 and Claude Code through ACP bridge -0.73.0 with Agent SDK 0.3.286. Both logs and traces use HTTP/protobuf. Prompts, +The qualified versions are Codex 0.170.0 and Claude Code through ACP bridge +0.73.0 with Agent SDK 0.3.328. Both logs and traces use HTTP/protobuf. Prompts, assistant responses and tool content default on. Additional tool details are a Claude Code and native OpenCode control; Codex has no equivalent switch. Codex requests up to 64 KiB of tool output (or zero when disabled); native event availability, truncation diff --git a/doc/architecture/paperclip-runner-compatibility.md b/doc/architecture/paperclip-runner-compatibility.md index c7082cec755..f7bcae3c91f 100644 --- a/doc/architecture/paperclip-runner-compatibility.md +++ b/doc/architecture/paperclip-runner-compatibility.md @@ -46,15 +46,15 @@ would hide the runtime that executed the task. ## Remote Codex version window -Remote native Codex runs accept stable CLI versions **`>=0.149.0 <0.161.0`**. -The install pin is `0.160.0`. A sandbox image can therefore use an older +Remote native Codex runs accept stable CLI versions **`>=0.149.0 <0.171.0`**. +The install pin is `0.170.0`. A sandbox image can therefore use an older compatible Codex without failing startup or installing another copy. The minimum is fixed at **`0.149.0`** until maintainers deliberately change it. It is not a rolling one-month support window. The official [`@openai/codex` publication history](https://registry.npmjs.org/@openai/codex) records `0.149.0` on 2026-08-20, `0.153.4` on 2026-09-04, `0.156.0` on -2026-09-22, and `0.160.0` on 2026-10-01. See also the [Codex changelog](https://learn.chatgpt.com/docs/changelog). +2026-09-22, `0.160.0` on 2026-10-01, and `0.170.0` on 2026-11-18. See also the [Codex changelog](https://learn.chatgpt.com/docs/changelog). This is an explicit compatibility window, not a claim that every Codex minor release follows a backward-compatible protocol. @@ -65,14 +65,14 @@ release follows a backward-compatible protocol. - The same check applies to discovered, explicitly staged, and npm-installed remote Codex executables, including the final executable after linking. - For an incompatible image, the existing - `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC=@openai/codex@0.160.0` configuration + `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC=@openai/codex@0.170.0` configuration allows installation of the pinned runtime. Without that configuration, startup reports the supported range and the remediation. - Runner binary contracts, required runner capabilities, artifact digests, provider-pack manifests, and runtime permission checks are unchanged. -- A model whose Codex floor is above the window (GPT-6.2 needs `0.169.1`) - cannot run natively. A selection of it falls back to the newest same-class - model that the CLI accepts and shows a visible message. +- A model whose Codex floor is above the CLI an image actually carries (for + example GPT-6.2, which needs `0.169.1`, on an image with `0.160.0`) falls back + to the newest same-class model that the CLI accepts and shows a visible message. This window does not relax the separate ACP provider-pack qualification. When qualifying newer Codex releases, review the upper bound in @@ -94,6 +94,16 @@ the installed ACP package contract. Codex `0.157.0` through `0.160.0` add the GPT-6.1 Sol catalog entry and app-server pagination without a documented app-server protocol break; the Linux CI qualification workflow covers the real startup and session-resume probes for the new pin. +The 2026-11-19 refresh moved the install pin to `0.170.0` and the upper bound +to `<0.171.0` after verifying the integrity-checked Linux x64 `0.170.0` +executable digest and running the opt-in paginated cleanup qualification +(`scripts/tests/native-cleanup-paginated-codex.mjs`) against the real `0.170.0` +app-server: initialize, thread start, and paginated thread resume passed. +Codex `0.161.0` through `0.170.0` add the GPT-6.2 catalog entries; their release +notes document no app-server protocol break. `0.169.0` keeps project +configuration disabled for `codex exec` in untrusted directories, which does not +affect Paperclip's app-server path or the `--skip-git-repo-check` CLI path. The +Linux CI qualification workflow covers the real startup and session-resume probes. Version-boundary and remote artifact-preparation regressions are covered by `codex-runtime-compatibility.test.ts` and `native-session-executor.test.ts`. diff --git a/docker/daytona-runner/Dockerfile b/docker/daytona-runner/Dockerfile index 26dfd488b61..0b9a1885eac 100644 --- a/docker/daytona-runner/Dockerfile +++ b/docker/daytona-runner/Dockerfile @@ -169,8 +169,8 @@ RUN /bin/sh -lc 'set -eu; \ for command_name in acpx claude-agent-acp codex-acp; do \ command -v "$command_name" >/dev/null || { echo "FATAL: $command_name not on PATH for daytona user" >&2; exit 1; }; \ done; \ - test "$(codex --version)" = "codex-cli 0.160.0"; \ - test "$(claude --version)" = "2.1.286 (Claude Code)"; \ + test "$(codex --version)" = "codex-cli 0.170.0"; \ + test "$(claude --version)" = "2.1.328 (Claude Code)"; \ test "$(opencode --version)" = "1.18.34"; \ test "$(acpx --version)" = "0.22.0"; \ test "$(claude-agent-acp --version)" = "0.73.0"; \ diff --git a/docker/daytona-runner/Dockerfile.release b/docker/daytona-runner/Dockerfile.release index ffa9d378ffb..128e8ef376d 100644 --- a/docker/daytona-runner/Dockerfile.release +++ b/docker/daytona-runner/Dockerfile.release @@ -9,8 +9,8 @@ COPY --chmod=0755 paperclip-runnerd /usr/local/bin/paperclip-runnerd RUN chmod -R a+rX /opt/paperclip-runner/provider-pack USER daytona RUN test -r /opt/paperclip-runner/provider-pack/provider-pack.json \ - && test "$(claude --version)" = "2.1.286 (Claude Code)" \ - && test "$(codex --version)" = "codex-cli 0.160.0" \ + && test "$(claude --version)" = "2.1.328 (Claude Code)" \ + && test "$(codex --version)" = "codex-cli 0.170.0" \ && test "$(acpx --version)" = "0.22.0" LABEL io.paperclip.runner.content-id="release-${SOURCE_REVISION}" \ org.opencontainers.image.revision="${SOURCE_REVISION}" diff --git a/docker/daytona-runner/README.md b/docker/daytona-runner/README.md index f5c4fc5012a..5ec6edfa95d 100644 --- a/docker/daytona-runner/README.md +++ b/docker/daytona-runner/README.md @@ -20,15 +20,14 @@ image that this Dockerfile can extend directly. ## Harness versions -The October 2026 refreshes pin Codex 0.160.0, Claude Agent SDK -0.3.286 (Claude Code 2.1.286), and OpenCode 1.18.34 in the shared provider -pack. Claude Code 2.1.280 is the minimum for -[Opus 5.5](https://code.claude.com/docs/en/model-config) and 2.1.284 is the -minimum for Sonnet 5.5; the pinned runtime also supports Fable 5.1. Fable 5.2 -needs Claude Code 2.1.321, so it does not run on Paperclip Runner with this -image until the provider pack moves past that version. Codex 0.160.0 ships bundled metadata for the -[GPT-6.1 Sol, GPT-6 Sol, and GPT-6 Luna model IDs](https://learn.chatgpt.com/docs/models); -GPT-6.2 Sol and Astra need Codex 0.169.1. +The November 19, 2026 refresh pins Codex 0.170.0 and Claude Agent SDK +0.3.328 (Claude Code 2.1.328) in the shared provider pack; OpenCode stays at +1.18.34. Claude Code 2.1.280 is the minimum for +[Opus 5.5](https://code.claude.com/docs/en/model-config), 2.1.284 for Sonnet 5.5, +and 2.1.321 for Fable 5.2, so the pinned runtime supports all three and Fable 5.1. +Codex 0.170.0 ships bundled metadata for +[GPT-6.2 Sol and Astra](https://learn.chatgpt.com/docs/models) (minimum 0.169.1) +as well as GPT-6.1 Sol, GPT-6 Sol, and GPT-6 Luna. The sandbox layer pins Grok CLI 1.0.89, Gemini CLI 0.68.0, Kimi Code 2.3.3, Cursor CLI 2026.11.17-f532c45, and GitHub CLI 2.105.0 (November 2026 refresh). The native Cursor provider uses its separately verified distribution, diff --git a/docs/deploy/environment-variables.md b/docs/deploy/environment-variables.md index 2489a0bd880..67fa6faa4ed 100644 --- a/docs/deploy/environment-variables.md +++ b/docs/deploy/environment-variables.md @@ -24,7 +24,7 @@ All environment variables that Paperclip uses for server configuration. | `PAPERCLIP_RUNNER_CA_BUNDLE_PATH` | (unset) | Optional PEM CA bundle for direct runner WSS. Platform roots remain enabled. There is no insecure TLS bypass. | | `PAPERCLIP_RUNNER_REMOTE_BINARY_PATH` | (host build) | Host-local path to a `paperclip-runnerd` artifact built for the remote target OS and architecture. Required when Paperclip and the remote sandbox do not share a compatible platform; build metadata and the required transport mode are verified before launch. When the sandbox image already has a `paperclip-runnerd` with the same SHA-256, Paperclip uses that copy and does not upload this file. | | `PAPERCLIP_RUNNER_REMOTE_CODEX_PATH` | (unset) | Optional host-local path to a Codex executable built for the remote target OS and architecture. For remote Codex-backed runners, Paperclip stages and verifies this executable beside `paperclip-runnerd`. | -| `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC` | (unset) | Optional pinned npm package spec (for example, `@openai/codex@0.160.0`) installed inside each fresh remote lease when its Codex harness is not baked into the sandbox image. Mutually exclusive with `PAPERCLIP_RUNNER_REMOTE_CODEX_PATH`; Paperclip verifies the installed executable before starting `runnerd`. | +| `PAPERCLIP_RUNNER_REMOTE_CODEX_NPM_SPEC` | (unset) | Optional pinned npm package spec (for example, `@openai/codex@0.170.0`) installed inside each fresh remote lease when its Codex harness is not baked into the sandbox image. Mutually exclusive with `PAPERCLIP_RUNNER_REMOTE_CODEX_PATH`; Paperclip verifies the installed executable before starting `runnerd`. | | `PAPERCLIP_RUNNER_REMOTE_PROVIDER_PACK_PATH` | `/opt/paperclip-runner/provider-pack` in Docker; otherwise unset | Host-local path to the immutable provider pack built by `pnpm --filter @paperclipai/paperclip-runner build:provider-pack`. Stamped standard Docker images include the pack; downstream compositions and the `cloud` target inherit it. Unstamped local Docker builds skip pack generation. The pack includes its target-built Node 24.11+ runtime, locked production dependencies, OpenCode proxy/executable, and ACPX sidecar. Remote OpenCode and ACPX fail closed without it. A preinstalled pack is accepted only when its complete digested manifest matches this build-owned pack; otherwise Paperclip stages this pack into the sandbox. | | `PAPERCLIP_HIDDEN_SETTINGS` | (unset) | Comma-separated settings surfaces to hide from the UI and floor at the API, for operators hosting Paperclip for others (managed cloud, internal shared server). See [Hiding settings surfaces](#hiding-settings-surfaces). | | `PAPERCLIP_SETTING_DEFAULTS` | (unset) | JSON object replacing the schema default of selected instance settings, for hosting operators. See [Operator setting defaults](#operator-setting-defaults). | diff --git a/package.json b/package.json index 2213c21acb7..0997306dd5a 100644 --- a/package.json +++ b/package.json @@ -127,8 +127,8 @@ "postgres@3.4.9": "patches/postgres@3.4.9.patch" }, "overrides": { - "@agentclientprotocol/codex-acp@1.6.2>@openai/codex": "0.160.0", - "@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk": "0.3.286", + "@agentclientprotocol/codex-acp@1.6.2>@openai/codex": "0.170.0", + "@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk": "0.3.328", "rollup": ">=4.59.0", "react": "^19.2.8", "react-dom": "^19.2.8", diff --git a/packages/adapters/claude-local/src/index.test.ts b/packages/adapters/claude-local/src/index.test.ts index d4b610aca68..927570c06d3 100644 --- a/packages/adapters/claude-local/src/index.test.ts +++ b/packages/adapters/claude-local/src/index.test.ts @@ -50,6 +50,7 @@ describe("Claude model defaults", () => { it("maps an Agent SDK 0.3.N release to the Claude Code 2.1.N it bundles", () => { expect(claudeCodeVersionForAgentSdk("0.3.286")).toBe("2.1.286"); + expect(claudeCodeVersionForAgentSdk("0.3.328")).toBe("2.1.328"); expect(claudeCodeVersionForAgentSdk(" 0.3.321 ")).toBe("2.1.321"); for (const version of ["0.4.1", "0.3.286-beta.1", "", null, undefined]) { expect(claudeCodeVersionForAgentSdk(version)).toBeNull(); diff --git a/packages/adapters/codex-local/src/server/codex-home.test.ts b/packages/adapters/codex-local/src/server/codex-home.test.ts index dd652d56919..d54ce71867a 100644 --- a/packages/adapters/codex-local/src/server/codex-home.test.ts +++ b/packages/adapters/codex-local/src/server/codex-home.test.ts @@ -1140,7 +1140,7 @@ describe("stageCodexHomeForSync", () => { const command = path.join(root, "fake-codex"); await fs.writeFile(command, `#!${process.execPath} const fs = require("node:fs"), path = require("node:path"); -if (process.argv.includes("--version")) { console.log("codex-cli 0.160.0"); process.exit(0); } +if (process.argv.includes("--version")) { console.log("codex-cli 0.170.0"); process.exit(0); } process.stdin.resume(); process.stdin.on("end", () => { const argv = process.argv.slice(2), index = argv.indexOf("--profile"); diff --git a/packages/adapters/codex-local/src/server/execute.ssh-host-auth.test.ts b/packages/adapters/codex-local/src/server/execute.ssh-host-auth.test.ts index 855beb2d7f8..6f8e659df83 100644 --- a/packages/adapters/codex-local/src/server/execute.ssh-host-auth.test.ts +++ b/packages/adapters/codex-local/src/server/execute.ssh-host-auth.test.ts @@ -144,7 +144,7 @@ exec /bin/cp "$@" if (mode.startsWith("partial_upload")) throw new Error("fixture partial SSH upload"); }); runChildProcess.mockImplementation(async (...args: unknown[]) => { - if ((args[2] as string[]).includes("--version")) return { exitCode: 0, signal: null, timedOut: false, stdout: mode === "unqualified_observability" ? "codex-cli 0.159.0\n" : "codex-cli 0.160.0\n", stderr: "", pid: 123, startedAt: new Date().toISOString() }; + if ((args[2] as string[]).includes("--version")) return { exitCode: 0, signal: null, timedOut: false, stdout: mode === "unqualified_observability" ? "codex-cli 0.159.0\n" : "codex-cli 0.170.0\n", stderr: "", pid: 123, startedAt: new Date().toISOString() }; const env = (args[3] as { env: Record }).env; expect(env.CODEX_HOME).toBe(native); expect(env.HOME).toBeUndefined(); diff --git a/packages/adapters/codex-local/src/server/execute.ts b/packages/adapters/codex-local/src/server/execute.ts index e359f71dfef..1bcfcd7808e 100644 --- a/packages/adapters/codex-local/src/server/execute.ts +++ b/packages/adapters/codex-local/src/server/execute.ts @@ -1168,12 +1168,12 @@ export async function execute(ctx: AdapterExecutionContext): Promise {}, }); - qualified = version.exitCode === 0 && /^codex-cli 0\.160\.0\s*$/.test(version.stdout.trim()); + qualified = version.exitCode === 0 && /^codex-cli 0\.170\.0\s*$/.test(version.stdout.trim()); } catch { /* Export qualification must not block baseline work. */ } if (!qualified) { await observabilityProfile.cleanup(); observabilityProfile = null; - await onLog("stderr", "[paperclip] Company observability was not applied: this Codex executable is not the qualified 0.160.0 release.\n"); + await onLog("stderr", "[paperclip] Company observability was not applied: this Codex executable is not the qualified 0.170.0 release.\n"); } } const loggedEnv = buildInvocationEnvForLogs(env, { diff --git a/packages/paperclip-runner/acpx-profiles.json b/packages/paperclip-runner/acpx-profiles.json index 1e36fb3121f..4b5cb4cea11 100644 --- a/packages/paperclip-runner/acpx-profiles.json +++ b/packages/paperclip-runner/acpx-profiles.json @@ -55,7 +55,7 @@ "agentServerPackage": "@agentclientprotocol/claude-agent-acp", "agentServerVersion": "0.73.0", "agentRuntimePackage": "@anthropic-ai/claude-agent-sdk", - "agentRuntimeVersion": "0.3.286", + "agentRuntimeVersion": "0.3.328", "commandDigest": "sha256:9d73d1f0f121fb96cc8badb28c22d5bff02d8582eb2e40360a81c189e1b9422a", "requiresProviderPolicy": false }, @@ -64,7 +64,7 @@ "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", + "agentRuntimeVersion": "0.170.0", "commandDigest": "sha256:443491f4e814501a5dc47347e4510e84faeec9c9382e2d4e53bfe69386d5aabc", "requiresProviderPolicy": false }, diff --git a/packages/paperclip-runner/package.json b/packages/paperclip-runner/package.json index b57658f5b54..e37760e0a23 100644 --- a/packages/paperclip-runner/package.json +++ b/packages/paperclip-runner/package.json @@ -180,7 +180,7 @@ "@agentclientprotocol/claude-agent-acp": "0.73.0", "@agentclientprotocol/codex-acp": "1.6.2", "@agentclientprotocol/sdk": "1.9.0", - "@openai/codex": "0.160.0", + "@openai/codex": "0.170.0", "acpx": "0.22.0", "ajv": "^8.20.0", "json-schema-to-ts": "^3.1.1", diff --git a/packages/paperclip-runner/runner/crates/runner-core/src/acpx_provider_backend.rs b/packages/paperclip-runner/runner/crates/runner-core/src/acpx_provider_backend.rs index 9f876068164..2a1c87865c3 100644 --- a/packages/paperclip-runner/runner/crates/runner-core/src/acpx_provider_backend.rs +++ b/packages/paperclip-runner/runner/crates/runner-core/src/acpx_provider_backend.rs @@ -7088,6 +7088,7 @@ mod tests { ("command_moved", "launch_shape_changed"), ("args_changed", "launch_shape_changed"), ("agent_server_release", ""), + ("agent_runtime_release", ""), ("acpx_release", ""), ] { let (directory, mut config, _, saved) = @@ -7135,6 +7136,9 @@ mod tests { } "args_changed" => profile.args.push("--changed".into()), "agent_server_release" => state.descriptor.agent_server_version = "0.0.1".into(), + "agent_runtime_release" => { + state.descriptor.agent_runtime_version = Some("0.3.286".into()) + } "acpx_release" => { state.descriptor.acpx_version = "0.0.1".into(); state.descriptor.provider_version = "0.0.1".into(); @@ -7221,4 +7225,49 @@ mod tests { assert!(restored.active_turn_id.is_none()); fs::remove_dir_all(directory).unwrap(); } + + // The previous release bundled Agent SDK 0.3.286 and Codex 0.160.0 behind + // the same bridge command digests. A runner that bundles a newer runtime + // cannot restore a session that runtime saved, whether the session was + // settled or a deploy landed mid-turn. Restore refuses it by name, opens no + // provider and keeps the saved bytes; the server then continues the task in + // a fresh provider session in the same workspace. + #[cfg(unix)] + #[test] + fn a_session_saved_by_the_previous_agent_runtime_is_refused_by_name() { + let mut cases = Vec::new(); + for (agent, runtime) in [("claude", "0.3.286"), ("codex", "0.160.0")] { + let (directory, config, _, _) = + settled_session_after_runner_upgrade(&format!("previous-runtime-{agent}"), agent); + cases.push((agent, runtime, directory, config)); + } + let (directory, config, _) = + interrupted_turn_after_runner_upgrade("previous-runtime-mid-turn"); + cases.push(("claude mid-turn", "0.3.286", directory, config)); + for (label, runtime, directory, config) in cases { + let state_path = directory.join(ACPX_PROVIDER_STATE_FILE); + let mut prior: AcpxDurableState = + serde_json::from_slice(&fs::read(&state_path).unwrap()).unwrap(); + prior.descriptor.agent_runtime_version = Some(runtime.into()); + fs::write(&state_path, serde_json::to_vec(&prior).unwrap()).unwrap(); + let retained = fs::read(&state_path).unwrap(); + + let mut recovered = AcpxCommandExecutor::with_runner_config(&directory, &config); + let error = recovered.restore().unwrap_err(); + assert!( + error + .to_string() + .contains("does not match a qualified immutable profile"), + "{label}: {error}" + ); + assert_eq!( + error.classification(), + Some(crate::durable::PROVIDER_STATE_INCOMPATIBLE), + "{label}" + ); + assert!(recovered.session.is_none(), "{label}"); + assert_eq!(fs::read(&state_path).unwrap(), retained, "{label}"); + fs::remove_dir_all(directory).unwrap(); + } + } } diff --git a/packages/paperclip-runner/runner/crates/runner-core/src/generated_acpx_profiles.rs b/packages/paperclip-runner/runner/crates/runner-core/src/generated_acpx_profiles.rs index 11ccacdf6f3..2c39b15ad37 100644 --- a/packages/paperclip-runner/runner/crates/runner-core/src/generated_acpx_profiles.rs +++ b/packages/paperclip-runner/runner/crates/runner-core/src/generated_acpx_profiles.rs @@ -81,7 +81,7 @@ pub(crate) fn acpx_release_profile(agent: &str) -> Option { agent_server_package: "@agentclientprotocol/claude-agent-acp", agent_server_version: "0.73.0", agent_runtime_package: Some("@anthropic-ai/claude-agent-sdk"), - agent_runtime_version: Some("0.3.286"), + agent_runtime_version: Some("0.3.328"), command_digest: "sha256:9d73d1f0f121fb96cc8badb28c22d5bff02d8582eb2e40360a81c189e1b9422a", requires_provider_policy: false, @@ -91,7 +91,7 @@ pub(crate) fn acpx_release_profile(agent: &str) -> Option { agent_server_package: "@agentclientprotocol/codex-acp", agent_server_version: "1.6.2", agent_runtime_package: Some("@openai/codex"), - agent_runtime_version: Some("0.160.0"), + agent_runtime_version: Some("0.170.0"), command_digest: "sha256:443491f4e814501a5dc47347e4510e84faeec9c9382e2d4e53bfe69386d5aabc", requires_provider_policy: false, diff --git a/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_warm_attachment.rs b/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_warm_attachment.rs index b3b7673677c..91a7d0868fc 100644 --- a/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_warm_attachment.rs +++ b/packages/paperclip-runner/runner/crates/runner-core/tests/acpx_warm_attachment.rs @@ -88,7 +88,7 @@ fn checkpoints_the_sidecar_and_rebinds_consecutive_warm_runs_before_accepting_wo "providerVersion": "0.22.0", "agent": "codex", "model": "gpt-5.6-sol", "acpxVersion": "0.22.0", "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", "commandDigest": PROFILE_DIGEST, + "agentRuntimeVersion": "0.170.0", "commandDigest": PROFILE_DIGEST, "sidecarCommand": sidecar, "sidecarArgs": args, "runtimeDirectory": fixture.0, "normalizedSessionId": "session-1", "runId": "run-1", "cwd": fixture.0, "instructions": "Complete the supplied work.", @@ -249,7 +249,7 @@ fn reopens_the_conversation_for_a_turn_after_a_suspension_stop() { "providerVersion": "0.22.0", "agent": "codex", "model": "gpt-5.6-sol", "acpxVersion": "0.22.0", "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", "commandDigest": PROFILE_DIGEST, + "agentRuntimeVersion": "0.170.0", "commandDigest": PROFILE_DIGEST, "sidecarCommand": sidecar, "sidecarArgs": args, "runtimeDirectory": fixture.0, "normalizedSessionId": "session-1", "runId": "run-1", "cwd": fixture.0, "instructions": "Complete the supplied work.", @@ -368,7 +368,7 @@ fn only_a_restored_session_with_an_active_turn_polls_as_live() { "providerVersion": "0.22.0", "agent": "codex", "model": "gpt-5.6-sol", "acpxVersion": "0.22.0", "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", "commandDigest": PROFILE_DIGEST, + "agentRuntimeVersion": "0.170.0", "commandDigest": PROFILE_DIGEST, "sidecarCommand": sidecar, "sidecarArgs": args, "runtimeDirectory": fixture.0, "normalizedSessionId": "session-1", "runId": "run-1", "cwd": fixture.0, "instructions": "Complete the supplied work.", @@ -454,7 +454,7 @@ fn restores_the_conversation_after_losing_an_active_turn_to_a_runner_restart() { "providerVersion": "0.22.0", "agent": "codex", "model": "gpt-5.6-sol", "acpxVersion": "0.22.0", "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", "commandDigest": PROFILE_DIGEST, + "agentRuntimeVersion": "0.170.0", "commandDigest": PROFILE_DIGEST, "sidecarCommand": sidecar, "sidecarArgs": args, "runtimeDirectory": fixture.0, "normalizedSessionId": "session-1", "runId": "run-1", "cwd": fixture.0, "instructions": "Complete the supplied work.", @@ -598,7 +598,7 @@ fn restores_a_turn_lost_to_a_runner_upgrade_under_the_new_launch_profile() { "providerVersion": "0.22.0", "agent": "codex", "model": "gpt-5.6-sol", "acpxVersion": "0.22.0", "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", "commandDigest": PROFILE_DIGEST, + "agentRuntimeVersion": "0.170.0", "commandDigest": PROFILE_DIGEST, "sidecarCommand": sidecar, "sidecarArgs": args, "runtimeDirectory": fixture.0, "normalizedSessionId": "session-1", "runId": "run-1", "cwd": fixture.0, "instructions": "Complete the supplied work.", @@ -726,7 +726,7 @@ fn continues_a_settled_conversation_in_the_next_run_after_a_runner_upgrade() { "providerVersion": "0.22.0", "agent": "codex", "model": "gpt-5.6-sol", "acpxVersion": "0.22.0", "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", "commandDigest": PROFILE_DIGEST, + "agentRuntimeVersion": "0.170.0", "commandDigest": PROFILE_DIGEST, "sidecarCommand": sidecar, "sidecarArgs": args, "runtimeDirectory": fixture.0, "normalizedSessionId": "session-1", "runId": "run-1", "cwd": fixture.0, "instructions": "Complete the supplied work.", @@ -858,7 +858,7 @@ fn a_lost_cancellation_reply_still_settles_the_turn_and_suspends_the_runner() { "providerVersion": "0.22.0", "agent": "codex", "model": "gpt-5.6-sol", "acpxVersion": "0.22.0", "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", "commandDigest": PROFILE_DIGEST, + "agentRuntimeVersion": "0.170.0", "commandDigest": PROFILE_DIGEST, "sidecarCommand": sidecar, "sidecarArgs": args, "runtimeDirectory": fixture.0, "normalizedSessionId": "session-1", "runId": "run-1", "cwd": fixture.0, "instructions": "Complete the supplied work.", diff --git a/packages/paperclip-runner/runner/crates/runner-core/tests/native_provider_backend.rs b/packages/paperclip-runner/runner/crates/runner-core/tests/native_provider_backend.rs index 71272154c17..6f37fd0faa1 100644 --- a/packages/paperclip-runner/runner/crates/runner-core/tests/native_provider_backend.rs +++ b/packages/paperclip-runner/runner/crates/runner-core/tests/native_provider_backend.rs @@ -440,7 +440,7 @@ fn prepare_payload(directory: &Path, agent: &str) -> Value { fn prepare_payload_with_mode(directory: &Path, agent: &str, mode: &str) -> Value { let operations = Vec::new(); let (runtime_package, runtime_version) = if agent == "codex" { - (json!("@openai/codex"), json!("0.160.0")) + (json!("@openai/codex"), json!("0.170.0")) } else { (Value::Null, Value::Null) }; @@ -523,7 +523,7 @@ fn pending_acpx_runtime_request( provider["agentServerPackage"] = json!("@agentclientprotocol/claude-agent-acp"); provider["agentServerVersion"] = json!("0.73.0"); provider["agentRuntimePackage"] = json!("@anthropic-ai/claude-agent-sdk"); - provider["agentRuntimeVersion"] = json!("0.3.286"); + provider["agentRuntimeVersion"] = json!("0.3.328"); provider["commandDigest"] = json!(digest); provider["sidecarArgs"][3] = json!(digest); } else { diff --git a/packages/paperclip-runner/scripts/controlled-evals/controller.test.mjs b/packages/paperclip-runner/scripts/controlled-evals/controller.test.mjs index a97a9616d61..177cfff2baa 100644 --- a/packages/paperclip-runner/scripts/controlled-evals/controller.test.mjs +++ b/packages/paperclip-runner/scripts/controlled-evals/controller.test.mjs @@ -23,7 +23,7 @@ import { aggregateProtocolEvalCampaign, sanitizeProtocolEvalRuns } from '../runn import { childScript, fixture, success } from './controller-fixture.mjs'; test('expected ACPX profile reaches the child through function and command-line entrypoints', async t => { - const profile = { agent: 'claude', agentRuntimeVersion: '0.3.286' }; + const profile = { agent: 'claude', agentRuntimeVersion: '0.3.328' }; for (const mode of ['function', 'cli']) for (const stale of [false, true]) { const requests = mode === 'function' ? 1 : 0; const f = await fixture(t, { providerProfile: 'claude', builtAcpxProfile: profile, requests }); diff --git a/packages/paperclip-runner/src/contracts/native-execution.test.ts b/packages/paperclip-runner/src/contracts/native-execution.test.ts index e2f3075dc15..6cbb40d7a03 100644 --- a/packages/paperclip-runner/src/contracts/native-execution.test.ts +++ b/packages/paperclip-runner/src/contracts/native-execution.test.ts @@ -462,7 +462,7 @@ describe("NativeExecutionInputV1", () => { agentServerVersion: "0.73.0", agentProfileVersion: 1, agentRuntimePackage: "@anthropic-ai/claude-agent-sdk", - agentRuntimeVersion: "0.3.286", + agentRuntimeVersion: "0.3.328", }; const saved = { ...input, @@ -734,7 +734,7 @@ describe("native task context ownership", () => { kind: "acpx", agent: "codex", model: "gpt-5.6-sol", permissionMode: "approve-all", mode: "architect", profile: { driverKind: "acpx_runtime", protocolVersion: 1, acpxVersion: "0.22.0", agent: "codex", agentProfileVersion: 3, agentServerPackage: "@agentclientprotocol/codex-acp", agentServerVersion: "1.6.2", - agentRuntimePackage: "@openai/codex", agentRuntimeVersion: "0.160.0", commandDigest: `sha256:${"a".repeat(64)}` }, + agentRuntimePackage: "@openai/codex", agentRuntimeVersion: "0.170.0", commandDigest: `sha256:${"a".repeat(64)}` }, }; const value = { ...current, session: { ...current.session, driverKind: "acpx_runtime" }, provider }; const parsed = parseNativeExecutionInput(value); diff --git a/packages/paperclip-runner/src/drivers/acpx/generated-profiles.ts b/packages/paperclip-runner/src/drivers/acpx/generated-profiles.ts index 858e3566941..f0cb090f298 100644 --- a/packages/paperclip-runner/src/drivers/acpx/generated-profiles.ts +++ b/packages/paperclip-runner/src/drivers/acpx/generated-profiles.ts @@ -79,7 +79,7 @@ export const QUALIFIED_ACPX_PROFILE_DATA = { "agentServerPackage": "@agentclientprotocol/claude-agent-acp", "agentServerVersion": "0.73.0", "agentRuntimePackage": "@anthropic-ai/claude-agent-sdk", - "agentRuntimeVersion": "0.3.286", + "agentRuntimeVersion": "0.3.328", "commandDigest": "sha256:9d73d1f0f121fb96cc8badb28c22d5bff02d8582eb2e40360a81c189e1b9422a", "permissionPolicy": "interactive" }, @@ -92,7 +92,7 @@ export const QUALIFIED_ACPX_PROFILE_DATA = { "agentServerPackage": "@agentclientprotocol/codex-acp", "agentServerVersion": "1.6.2", "agentRuntimePackage": "@openai/codex", - "agentRuntimeVersion": "0.160.0", + "agentRuntimeVersion": "0.170.0", "commandDigest": "sha256:443491f4e814501a5dc47347e4510e84faeec9c9382e2d4e53bfe69386d5aabc", "permissionPolicy": "interactive" }, diff --git a/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts b/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts index ccf0c1d2fbc..e8ca82cd58a 100644 --- a/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts +++ b/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts @@ -77,9 +77,9 @@ describe("ACPX installation integrity", () => { const runtime = join(bridge, "node_modules/@anthropic-ai/claude-agent-sdk"); const name = `@anthropic-ai/claude-agent-sdk-${os}-${cpu}`; const platformRoot = join(parent, "node_modules", name); - const optionalDependencies = { [name]: "0.3.286" }; - const runtimeMetadata = { name: "@anthropic-ai/claude-agent-sdk", version: "0.3.286" }; - const platformMetadata = { name, version: "0.3.286", os: [os], cpu: [cpu] }; + const optionalDependencies = { [name]: "0.3.328" }; + const runtimeMetadata = { name: "@anthropic-ai/claude-agent-sdk", version: "0.3.328" }; + const platformMetadata = { name, version: "0.3.328", os: [os], cpu: [cpu] }; await Promise.all([mkdir(runtime, { recursive: true }), mkdir(platformRoot, { recursive: true })]); const command = 'process.stdout.write("unexecuted fixture");'; const reset = () => Promise.all([ @@ -146,10 +146,10 @@ describe("ACPX installation integrity", () => { const runtime = join(root, "node_modules/@openai/codex/package.json"); const platformRoot = join(parent, "node_modules/@openai/codex-linux-x64"); const platform = join(platformRoot, "package.json"); - const alias = "npm:@openai/codex@0.160.0-linux-x64"; + const alias = "npm:@openai/codex@0.170.0-linux-x64"; const selected = { name: "@paperclipai/server", optionalDependencies: { "@openai/codex-linux-x64": alias } }; - const runtimeMetadata = { name: "@openai/codex", version: "0.160.0", ...(!publishedDeclaration && { optionalDependencies: selected.optionalDependencies }) }; - const platformMetadata = { name: "@openai/codex", version: "0.160.0-linux-x64", os: ["linux"], cpu: ["x64"] }; + const runtimeMetadata = { name: "@openai/codex", version: "0.170.0", ...(!publishedDeclaration && { optionalDependencies: selected.optionalDependencies }) }; + const platformMetadata = { name: "@openai/codex", version: "0.170.0-linux-x64", os: ["linux"], cpu: ["x64"] }; await mkdir(dirname(runtime), { recursive: true }); await mkdir(platformRoot, { recursive: true }); const reset = async () => Promise.all([ @@ -193,14 +193,14 @@ describe("ACPX installation integrity", () => { const runtime = join(bridge, "node_modules/@openai/codex"); const platformRoot = join(parent, "node_modules/@openai/codex-linux-x64"); const native = join(platformRoot, "vendor/x86_64-unknown-linux-musl/bin/codex"); - const optionalDependencies = { "@openai/codex-linux-x64": "npm:@openai/codex@0.160.0-linux-x64" }; + const optionalDependencies = { "@openai/codex-linux-x64": "npm:@openai/codex@0.170.0-linux-x64" }; await Promise.all([mkdir(runtime, { recursive: true }), mkdir(dirname(native), { recursive: true })]); const command = 'process.stdout.write("unexecuted fixture");'; await Promise.all([ writeFile(join(root, "package.json"), JSON.stringify({ name: "@paperclipai/server", optionalDependencies })), writeFile(join(bridge, "package.json"), JSON.stringify({ name: "@agentclientprotocol/codex-acp", version: "1.6.2", bin: "server.js" })), writeFile(join(bridge, "server.js"), command), - writeFile(join(runtime, "package.json"), JSON.stringify({ name: "@openai/codex", version: "0.160.0" })), + writeFile(join(runtime, "package.json"), JSON.stringify({ name: "@openai/codex", version: "0.170.0" })), writeFile(native, "unqualified native bytes", { mode: 0o755 }), ]); const profile = { ...resolveQualifiedAcpxProfile("codex", "gpt-5.6-sol"), commandDigest: `sha256:${createHash("sha256").update(command).digest("hex")}` }; @@ -208,7 +208,7 @@ describe("ACPX installation integrity", () => { const platformSpy = vi.spyOn(process, "platform", "get").mockReturnValue("linux"); const archSpy = vi.spyOn(process, "arch", "get").mockReturnValue("x64"); try { - const metadata = { name: "@openai/codex", version: "0.160.0-linux-x64", os: ["linux"], cpu: ["x64"] }; + const metadata = { name: "@openai/codex", version: "0.170.0-linux-x64", os: ["linux"], cpu: ["x64"] }; await writeFile(join(platformRoot, "package.json"), JSON.stringify(metadata)); // A stale in-bundle package shadows the correct declared npm slot and // must fail rather than falling through to the hoisted installation. @@ -632,7 +632,7 @@ describe("ACPX installation integrity", () => { }, { name: "@anthropic-ai/claude-agent-sdk", - version: "0.3.286", + version: "0.3.328", directory: join(dependencyRoot, "claude-agent-sdk"), }, { diff --git a/packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts b/packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts index 1fab0150997..773755aa357 100644 --- a/packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts +++ b/packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts @@ -53,44 +53,44 @@ const VERIFIED_PROVIDER_RUNTIME_TARGET_ENV = const QUALIFIED_CLAUDE_LINUX_X64_RUNTIME = Object.freeze({ runtimePackageName: "@anthropic-ai/claude-agent-sdk", - runtimePackageVersion: "0.3.286", + runtimePackageVersion: "0.3.328", packageName: "@anthropic-ai/claude-agent-sdk-linux-x64", - packageVersion: "0.3.286", - dependencyDeclaration: "0.3.286", + packageVersion: "0.3.328", + dependencyDeclaration: "0.3.328", relativeExecutable: "claude", executableDigest: - "sha256:fe503f65c6289d59c23e5b21ae44f03583f997dd33a2cbfc75ab4f96fb8fc73f", + "sha256:a982d38030b97e750848add2cbb2df6d9a70d5544a22ca9b216a349ba25865e8", environmentVariable: "CLAUDE_CODE_EXECUTABLE", }); const QUALIFIED_CLAUDE_LINUX_ARM64_RUNTIME = Object.freeze({ ...QUALIFIED_CLAUDE_LINUX_X64_RUNTIME, packageName: "@anthropic-ai/claude-agent-sdk-linux-arm64", - executableDigest: "sha256:0292fa22ac2fd43e16be9d0e511ddd8347280d6e0ebaca744ef5b27e05d8d0f8", + executableDigest: "sha256:307f8bada27b37db7553fac75e86004e3dbff5a931ffc611b54fe710ce1eb521", }); const QUALIFIED_CLAUDE_DARWIN_RUNTIMES = { arm64: Object.freeze({ ...QUALIFIED_CLAUDE_LINUX_X64_RUNTIME, packageName: "@anthropic-ai/claude-agent-sdk-darwin-arm64", - executableDigest: "sha256:75e3016e9d2570767b08e43a7467d4817a4f149232c169ca295f2c95fef21433", + executableDigest: "sha256:e85547190ef8cd983033ba61b17194045a6fea00035da349efeabed86badacc9", }), x64: Object.freeze({ ...QUALIFIED_CLAUDE_LINUX_X64_RUNTIME, packageName: "@anthropic-ai/claude-agent-sdk-darwin-x64", - executableDigest: "sha256:53e6a936e89519d695230f9cc97943991286b72766674fba11bee845f0a7c047", + executableDigest: "sha256:bf40a5555c01e6afe6c028fbe0782f93580f4f0835fd5d13022e039ec76507e1", }), }; const QUALIFIED_CODEX_LINUX_X64_RUNTIME = Object.freeze({ runtimePackageName: "@openai/codex", - runtimePackageVersion: "0.160.0", + runtimePackageVersion: "0.170.0", packageName: "@openai/codex-linux-x64", - packageVersion: "0.160.0-linux-x64", - dependencyDeclaration: "npm:@openai/codex@0.160.0-linux-x64", + packageVersion: "0.170.0-linux-x64", + dependencyDeclaration: "npm:@openai/codex@0.170.0-linux-x64", relativeExecutable: "vendor/x86_64-unknown-linux-musl/bin/codex", executableDigest: - "sha256:12eb3e81114588aca3b7998f4f19e8997b056aca08e57a7ca7c8a3ec8c652aad", + "sha256:880819aab735adcf16f36cd628940b9f1e652a36c01d10a5d32f83cc84902971", environmentVariable: "CODEX_PATH", }); @@ -106,8 +106,8 @@ const QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES = Object.freeze([ }), Object.freeze({ packageName: "@anthropic-ai/claude-agent-sdk", - packageVersion: "0.3.286", - // The package's own package.json still declares 0.3.257 — 0.3.286 is + packageVersion: "0.3.328", + // The package's own package.json still declares 0.3.257 — 0.3.328 is // only what pnpm resolves, forced by the // "claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk" override in // the workspace root. This field binds the declared string, not the diff --git a/packages/paperclip-runner/src/drivers/acpx/qualified-profiles.test.ts b/packages/paperclip-runner/src/drivers/acpx/qualified-profiles.test.ts index 55f14462634..401c34cda63 100644 --- a/packages/paperclip-runner/src/drivers/acpx/qualified-profiles.test.ts +++ b/packages/paperclip-runner/src/drivers/acpx/qualified-profiles.test.ts @@ -32,14 +32,14 @@ describe("qualified ACPX profiles", () => { it("binds Codex ACP to the CLI runtime it launches", () => { expect(QUALIFIED_ACPX_PROFILES.codex).toMatchObject({ agentRuntimePackage: "@openai/codex", - agentRuntimeVersion: "0.160.0", + agentRuntimeVersion: "0.170.0", }); }); it("binds Claude ACP to the SDK and native CLI runtime it launches", () => { expect(QUALIFIED_ACPX_PROFILES.claude).toMatchObject({ agentRuntimePackage: "@anthropic-ai/claude-agent-sdk", - agentRuntimeVersion: "0.3.286", + agentRuntimeVersion: "0.3.328", }); }); }); diff --git a/packages/paperclip-runner/src/drivers/codex/codex-security-config.test.ts b/packages/paperclip-runner/src/drivers/codex/codex-security-config.test.ts index b9f64854e58..8650602a724 100644 --- a/packages/paperclip-runner/src/drivers/codex/codex-security-config.test.ts +++ b/packages/paperclip-runner/src/drivers/codex/codex-security-config.test.ts @@ -34,7 +34,7 @@ describe("Codex security configuration", () => { const command = resolvePinnedCodexCommand(); expect(evalProviderTransportOptions("codex").codexCommand).toBe(command); expect(execFileSync(command, ["--version"], { env: { PATH: dirname(process.execPath) }, - encoding: "utf8", timeout: 30_000, maxBuffer: 16 * 1024 }).trim()).toBe("codex-cli 0.160.0"); + encoding: "utf8", timeout: 30_000, maxBuffer: 16 * 1024 }).trim()).toBe("codex-cli 0.170.0"); }); it("resolves usable installed Codex commands and an absent-package PATH fallback while rejecting malformed or escaped dependencies", () => { @@ -62,8 +62,8 @@ describe("Codex security configuration", () => { const executable = join(codex, "bin/codex.js"); const platformName = "@openai/codex-" + process.platform + "-" + process.arch; const platform = join(root, "node_modules", platformName), vendor = join(platform, "vendor"); - const metadata = { name: "@openai/codex", version: "0.160.0", bin: { codex: "bin/codex.js" }, - optionalDependencies: { [platformName]: "npm:@openai/codex@0.160.0-" + process.platform + "-" + process.arch } }; + const metadata = { name: "@openai/codex", version: "0.170.0", bin: { codex: "bin/codex.js" }, + optionalDependencies: { [platformName]: "npm:@openai/codex@0.170.0-" + process.platform + "-" + process.arch } }; try { mkdirSync(pathDirectory); writeFileSync(pathCommand, "#!" + process.execPath + "\\nif (process.argv.slice(2).join(' ') !== '--version') process.exit(9); console.log('codex-cli 0.141.0');\\n", { mode: 0o755 }); @@ -123,23 +123,23 @@ describe("Codex security configuration", () => { writeFileSync(join(bridge, "package.json"), JSON.stringify({ name: "@agentclientprotocol/codex-acp", version: "1.6.2" })); writeFileSync(join(codex, "package.json"), JSON.stringify(metadata)); mkdirSync(vendor, { recursive: true }); - const platformMetadata = { name: "@openai/codex", version: "0.160.0-" + process.platform + "-" + process.arch, + const platformMetadata = { name: "@openai/codex", version: "0.170.0-" + process.platform + "-" + process.arch, os: [process.platform], cpu: [process.arch] }; writeFileSync(join(platform, "package.json"), JSON.stringify(platformMetadata)); - writeFileSync(executable, "#!" + process.execPath + "\\nif (process.argv.slice(2).join(' ') !== '--version') process.exit(9); console.log('codex-cli 0.160.0');\\n", { mode: 0o755 }); + writeFileSync(executable, "#!" + process.execPath + "\\nif (process.argv.slice(2).join(' ') !== '--version') process.exit(9); console.log('codex-cli 0.170.0');\\n", { mode: 0o755 }); assert.equal(resolveCodexCommand(issuer, commandEnvironment), executable, "The selected installed bridge closure takes precedence over PATH"); assert.equal(resolvePinnedCodexCommand(issuer, commandEnvironment), executable, "The published compatibility alias keeps ordinary command semantics"); const roots = codexExecutableReadOnlyRoots({ PATH: "/missing-codex-command" }, executable); assert.ok(roots.includes(vendor), "The npm-hoisted native vendor directory remains readable"); assert.ok(!roots.includes(platform) && !roots.includes(root), "Hoisting must not expose npm ancestry"); assert.equal(execFileSync(resolveCodexCommand(issuer, commandEnvironment), ["--version"], { env: { PATH: "/missing-codex-command" }, - encoding: "utf8", timeout: 5_000 }).trim(), "codex-cli 0.160.0"); + encoding: "utf8", timeout: 5_000 }).trim(), "codex-cli 0.170.0"); for (const bin of ["../../escaped-codex", "/usr/bin/codex", {}, ""]) { writeFileSync(join(codex, "package.json"), JSON.stringify({ ...metadata, bin })); assert.throws(() => resolveCodexCommand(issuer, commandEnvironment), /contained executable|escapes its package/); } - for (const version of ["0.159.0", "0.161.0"]) { + for (const version of ["0.169.0", "0.171.0"]) { writeFileSync(join(codex, "package.json"), JSON.stringify({ ...metadata, version })); assert.equal(resolveCodexCommand(issuer, commandEnvironment), executable, "Independently usable older and newer installed wrappers remain selectable"); } @@ -203,7 +203,7 @@ describe("Codex security configuration", () => { }; // Resource lookup protects package ownership and paths. Version // qualification belongs to ACPX, not ordinary Codex shell access. - for (const version of ["0.159.0", "0.161.0"]) { + for (const version of ["0.169.0", "0.171.0"]) { for (const [path, changed] of [ [serverManifest, { ...serverMetadata, optionalDependencies: { [platformName]: "npm:@openai/codex@" + version + "-" + process.platform + "-" + process.arch } }], [serverManifest, { ...serverMetadata, dependencies: { "@agentclientprotocol/codex-acp": version } }], @@ -220,9 +220,9 @@ describe("Codex security configuration", () => { for (const [path, changed] of [ [serverManifest, { ...serverMetadata, optionalDependencies: {} }], [serverManifest, { ...serverMetadata, name: "unowned-server" }], - [serverManifest, { ...serverMetadata, optionalDependencies: { [platformName]: "npm:unowned/codex@0.160.0-" + process.platform + "-" + process.arch } }], + [serverManifest, { ...serverMetadata, optionalDependencies: { [platformName]: "npm:unowned/codex@0.170.0-" + process.platform + "-" + process.arch } }], [serverManifest, { ...serverMetadata, optionalDependencies: { [platformName]: "file:/unowned/native" } }], - [serverManifest, { ...serverMetadata, optionalDependencies: { [platformName]: "npm:@openai/codex@0.160.0-unsupported-os-" + process.arch } }], + [serverManifest, { ...serverMetadata, optionalDependencies: { [platformName]: "npm:@openai/codex@0.170.0-unsupported-os-" + process.arch } }], [serverManifest, { ...serverMetadata, dependencies: {} }], [serverManifest, { ...serverMetadata, dependencies: { "@agentclientprotocol/codex-acp": "" } }], [publishedBridgeManifest, { ...publishedBridgeMetadata, name: "unqualified-bridge" }], diff --git a/packages/paperclip-runner/test/acpx-codex-package-contract.test.mjs b/packages/paperclip-runner/test/acpx-codex-package-contract.test.mjs index 0496f5fd763..4bf1c8ae562 100644 --- a/packages/paperclip-runner/test/acpx-codex-package-contract.test.mjs +++ b/packages/paperclip-runner/test/acpx-codex-package-contract.test.mjs @@ -51,10 +51,10 @@ const nativeSessionExecutor = await readFile( ); test("the runner pins every qualified ACPX production dependency", () => { - assert.equal(runnerPackage.dependencies["@openai/codex"], "0.160.0"); + assert.equal(runnerPackage.dependencies["@openai/codex"], "0.170.0"); assert.equal(runnerPackage.dependencies["@anthropic-ai/claude-agent-sdk"], undefined); assert.equal(rootPackage.pnpm.overrides["@agentclientprotocol/codex-acp@1.6.2>@openai/codex"], runnerPackage.dependencies["@openai/codex"]); - assert.equal(rootPackage.pnpm.overrides["@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk"], "0.3.286"); + assert.equal(rootPackage.pnpm.overrides["@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk"], "0.3.328"); assert.deepEqual(runnerPackage.optionalDependencies, { "@github/copilot-darwin-arm64": "1.0.88", "@github/copilot-darwin-x64": "1.0.88", @@ -128,7 +128,7 @@ test("old and new pnpm configuration both apply the exact runtime patches", () = providerPackBuilder, /copyFileSync\(process\.execPath, stableNodeCommand\)/, ); - assert.match(codexPatch, /\+ "@openai\/codex": "0\.160\.0"/); + assert.match(codexPatch, /\+ "@openai\/codex": "0\.170\.0"/); }); test("the ACPX patch preserves verified spawning and leaves the environment to the host", () => { diff --git a/patches/@agentclientprotocol__codex-acp@1.6.2.patch b/patches/@agentclientprotocol__codex-acp@1.6.2.patch index 0bcd8c9bb17..800db0e173b 100644 --- a/patches/@agentclientprotocol__codex-acp@1.6.2.patch +++ b/patches/@agentclientprotocol__codex-acp@1.6.2.patch @@ -6,7 +6,7 @@ diff --git a/package.json b/package.json "dependencies": { "@agentclientprotocol/sdk": "^1.3.0", - "@openai/codex": "^0.148.0", -+ "@openai/codex": "0.160.0", ++ "@openai/codex": "0.170.0", "diff": "^9.0.0", "open": "^11.0.0", "vscode-jsonrpc": "^9.0.1", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 1e87869239d..ad1a1dc57de 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -31,8 +31,8 @@ patchedDependencies: # Agent CLIs share the current runtime used by the native provider pack. # pnpm patches change package files, but overrides control dependency resolution. overrides: - "@agentclientprotocol/codex-acp@1.6.2>@openai/codex": "0.160.0" - "@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk": "0.3.286" + "@agentclientprotocol/codex-acp@1.6.2>@openai/codex": "0.170.0" + "@agentclientprotocol/claude-agent-acp@0.73.0>@anthropic-ai/claude-agent-sdk": "0.3.328" rollup: ">=4.59.0" react: "^19.2.8" react-dom: "^19.2.8" diff --git a/scripts/__tests__/grok-public-install-sandbox.test.mjs b/scripts/__tests__/grok-public-install-sandbox.test.mjs index 91aef680654..f88ab5489cf 100644 --- a/scripts/__tests__/grok-public-install-sandbox.test.mjs +++ b/scripts/__tests__/grok-public-install-sandbox.test.mjs @@ -352,7 +352,7 @@ test('the installed Codex probe exercises the public export and rejects incomple else { nativeBytes.set([0x7f, 0x45, 0x4c, 0x46, 2, 1]); nativeBytes.writeUInt16LE(process.arch === 'arm64' ? 183 : 62, 18); } const nativeFile = join(nativeVendor, triple, 'bin', process.platform === 'win32' ? 'codex.exe' : 'codex'); mkdirSync(join(nativeVendor, triple, 'bin'), { recursive: true }); writeFileSync(nativeFile, nativeBytes, { mode: 0o755 }); - const manifest = { name: '@openai/codex', version: `0.160.0-${target}`, os: [process.platform], cpu: [process.arch] }; + const manifest = { name: '@openai/codex', version: `0.170.0-${target}`, os: [process.platform], cpu: [process.arch] }; writeFileSync(join(platform, 'package.json'), JSON.stringify(manifest)); const entry = { name: manifest.name, version: manifest.version, resolved: `https://registry.npmjs.org/@openai/codex/-/codex-${manifest.version}.tgz`, integrity: `sha512-${Buffer.alloc(64, 1).toString('base64')}` }; @@ -375,13 +375,13 @@ test('the installed Codex probe exercises the public export and rejects incomple writeFileSync(integrity, moduleSource); writeFileSync(join(drivers, 'qualified-profiles.js'), "export const resolveQualifiedAcpxProfile = (agent, model) => ({ agent, model });"); const wrapper = join(consumer, 'node_modules/@openai/codex/bin'); mkdirSync(wrapper, { recursive: true }); - writeFileSync(join(wrapper, '../package.json'), JSON.stringify({ name: '@openai/codex', version: '0.160.0' })); + writeFileSync(join(wrapper, '../package.json'), JSON.stringify({ name: '@openai/codex', version: '0.170.0' })); const index = join(vendor, 'index.mjs'), command = join(wrapper, 'codex.js'), probe = join(root, 'probe.mjs'); const executable = version => writeFileSync(command, `#!/bin/sh\n[ "$1" = --version ] || exit 65\nprintf '%s\\n' 'codex-cli ${version}'\n`, { mode: 0o755 }); - writeFileSync(probe, installedCodexProbeSource(index, consumer, '0.160.0')); + writeFileSync(probe, installedCodexProbeSource(index, consumer, '0.170.0')); const run = () => spawnSync(process.execPath, [probe], { encoding: 'utf8', timeout: 10_000, env: { PATH: '/usr/bin:/bin', NODE_PATH: '' } }); writeFileSync(index, `export const resolvePinnedCodexCommand = () => ${JSON.stringify(command)};`); - executable('0.160.0'); + executable('0.170.0'); let result = run(); assert.equal(result.status, 0, result.stderr); assert.equal(JSON.parse(result.stdout).pinnedCodexCommandVerified, true); assert.equal(JSON.parse(result.stdout).codexPlatformPackageSource, 'official npm'); @@ -419,7 +419,7 @@ test('the installed Codex probe exercises the public export and rejects incomple result = run(); assert.equal(result.status, 0, result.stderr); assert.equal(JSON.parse(result.stdout).codexPlatformPackages.length, 2); assert.equal(JSON.parse(result.stdout).codexSelectedPlatformPath, platformPath); - assert.equal(JSON.parse(result.stdout).codexSelectedPlatformVersion, '0.160.0-' + target); + assert.equal(JSON.parse(result.stdout).codexSelectedPlatformVersion, '0.170.0-' + target); const legacyCommand = join(legacy, 'codex'); writeFileSync(legacyCommand, '#!/bin/sh\nexit 0\n', { mode: 0o755 }); writeFileSync(index, `export const resolvePinnedCodexCommand = () => ${JSON.stringify(legacyCommand)};`); @@ -433,7 +433,7 @@ test('the installed Codex probe exercises the public export and rejects incomple result = run(); assert.equal(result.status, 0, result.stderr); assert.equal(JSON.parse(result.stdout).installedCodexVersion, 'codex-cli 0.156.1'); assert.equal(JSON.parse(result.stdout).codexQualifiedInstallationVerified, undefined); - writeFileSync(probe, installedCodexProbeSource(index, consumer, '0.160.0')); + writeFileSync(probe, installedCodexProbeSource(index, consumer, '0.170.0')); writeFileSync(security, securitySource); writeFileSync(index, `import { writeFileSync } from 'node:fs'; export const resolvePinnedCodexCommand = () => { @@ -473,7 +473,7 @@ test('the installed Codex probe exercises the public export and rejects incomple delete lock.packages[platformPath].inBundle; writeFileSync(join(consumer, 'package-lock.json'), JSON.stringify(lock)); const foreign = join(consumer, 'node_modules/@openai/codex-win32-arm64'); mkdirSync(foreign); - writeFileSync(join(foreign, 'package.json'), JSON.stringify({ name: '@openai/codex', version: '0.160.0-win32-arm64' })); + writeFileSync(join(foreign, 'package.json'), JSON.stringify({ name: '@openai/codex', version: '0.170.0-win32-arm64' })); result = run(); assert.notEqual(result.status, 0); assert.match(result.stderr, /only the host/); rmSync(foreign, { recursive: true }); executable('9.9.9'); result = run(); assert.notEqual(result.status, 0); assert.match(result.stderr, /qualified pin/); @@ -506,7 +506,7 @@ test('actual tar member checks allow Codex JavaScript but reject nested platform test('consumer provenance rejects bundled, foreign, inconsistent and non-official Codex payloads', () => { for (const target of ['linux-x64', 'linux-arm64']) { const path = `node_modules/@openai/codex-${target}`; - const manifest = { name: '@openai/codex', version: `0.160.0-${target}`, os: ['linux'], cpu: [target.slice('linux-'.length)] }; + const manifest = { name: '@openai/codex', version: `0.170.0-${target}`, os: ['linux'], cpu: [target.slice('linux-'.length)] }; const entry = { version: manifest.version, resolved: `https://registry.npmjs.org/@openai/codex/-/codex-${manifest.version}.tgz`, integrity: `sha512-${Buffer.alloc(64, 1).toString('base64')}` }; const check = (value = entry, installed = [{ path, manifest }]) => assertInstalledCodexPlatformProvenance({ packages: { [path]: value } }, installed, target); @@ -514,12 +514,12 @@ test('consumer provenance rejects bundled, foreign, inconsistent and non-officia const legacyManifest = { ...manifest, version: `0.156.1-${target}` }; assert.equal(check({ ...entry, version: legacyManifest.version, resolved: `https://registry.npmjs.org/@openai/codex/-/codex-0.156.1-${target}.tgz` }, [{ path, manifest: legacyManifest }]).codexConsumerHostOnly, true); - assert.throws(() => check(entry, [{ path, manifest: { ...manifest, version: `^0.160.0-${target}` } }]), /exact host version/); + assert.throws(() => check(entry, [{ path, manifest: { ...manifest, version: `^0.170.0-${target}` } }]), /exact host version/); for (const change of [ { inBundle: true }, { link: true }, { version: `0.156.1-${target}` }, - { resolved: `https://example.com/@openai/codex/-/codex-0.160.0-${target}.tgz` }, + { resolved: `https://example.com/@openai/codex/-/codex-0.170.0-${target}.tgz` }, { resolved: `https://registry.npmjs.org/@openai/codex/-/codex-0.156.1-${target}.tgz` }, - { resolved: `https://user@registry.npmjs.org/@openai/codex/-/codex-0.160.0-${target}.tgz` }, + { resolved: `https://user@registry.npmjs.org/@openai/codex/-/codex-0.170.0-${target}.tgz` }, { integrity: undefined }, { integrity: 'sha512-AA==' }, ]) assert.throws(() => check({ ...entry, ...change })); assert.throws(() => check(entry, []), /must install its host/); diff --git a/scripts/acpx-patch-packaging.test.mjs b/scripts/acpx-patch-packaging.test.mjs index 4508e73bea5..490a0acf0ef 100644 --- a/scripts/acpx-patch-packaging.test.mjs +++ b/scripts/acpx-patch-packaging.test.mjs @@ -55,9 +55,9 @@ function esbuildFixture(t) { return { directory, graph, esbuild, producerBinary, publish, writePackage }; } const codexTargets = ["linux-x64", "linux-arm64", "darwin-x64", "darwin-arm64", "win32-x64", "win32-arm64"]; -const codexOptional = Object.fromEntries(codexTargets.map(target => [`@openai/codex-${target}`, `npm:@openai/codex@0.160.0-${target}`])); +const codexOptional = Object.fromEntries(codexTargets.map(target => [`@openai/codex-${target}`, `npm:@openai/codex@0.170.0-${target}`])); const claudeTargets = [...codexTargets, "linux-x64-musl", "linux-arm64-musl"]; -const claudeOptional = Object.fromEntries(claudeTargets.map(target => [`@anthropic-ai/claude-agent-sdk-${target}`, "0.3.286"])); +const claudeOptional = Object.fromEntries(claudeTargets.map(target => [`@anthropic-ai/claude-agent-sdk-${target}`, "0.3.328"])); function claudeFixture(t) { const directory = realpathSync(mkdtempSync(join(tmpdir(), "paperclip-bundled-claude-"))); t.after(() => rmSync(directory, { recursive: true, force: true })); @@ -68,15 +68,15 @@ function claudeFixture(t) { return location; }; const bridge = writePackage(join(graph, "@agentclientprotocol/claude-agent-acp"), { - name: "@agentclientprotocol/claude-agent-acp", version: "0.73.0", dependencies: { "@anthropic-ai/claude-agent-sdk": "0.3.286" }, + name: "@agentclientprotocol/claude-agent-acp", version: "0.73.0", dependencies: { "@anthropic-ai/claude-agent-sdk": "0.3.328" }, }); writeFileSync(join(bridge, "index.js"), "export {};\n"); const runtime = writePackage(join(graph, "@anthropic-ai/claude-agent-sdk"), { - name: "@anthropic-ai/claude-agent-sdk", version: "0.3.286", exports: { ".": "./sdk.mjs" }, optionalDependencies: claudeOptional, + name: "@anthropic-ai/claude-agent-sdk", version: "0.3.328", exports: { ".": "./sdk.mjs" }, optionalDependencies: claudeOptional, }); writeFileSync(join(runtime, "sdk.mjs"), "// official JavaScript fixture, never executed\n"); const producer = writePackage(join(graph, "@anthropic-ai/claude-agent-sdk-linux-x64"), { - name: "@anthropic-ai/claude-agent-sdk-linux-x64", version: "0.3.286", os: ["linux"], cpu: ["x64"], + name: "@anthropic-ai/claude-agent-sdk-linux-x64", version: "0.3.328", os: ["linux"], cpu: ["x64"], }); writeFileSync(join(producer, "claude"), "producer native fixture, never executed"); const profiles = [{ agent: "claude", ...profileData.profiles.claude }]; @@ -90,14 +90,14 @@ function codexFixture(t) { const writePackage = (location, metadata) => { mkdirSync(location, { recursive: true }); writeFileSync(join(location, "package.json"), JSON.stringify(metadata)); return location; }; - const bridge = writePackage(join(graph, "@agentclientprotocol/codex-acp"), { name: "@agentclientprotocol/codex-acp", version: "1.6.2", dependencies: { "@openai/codex": "0.160.0" } }); + const bridge = writePackage(join(graph, "@agentclientprotocol/codex-acp"), { name: "@agentclientprotocol/codex-acp", version: "1.6.2", dependencies: { "@openai/codex": "0.170.0" } }); writeFileSync(join(bridge, "index.js"), "export {};\n"); - const runtime = writePackage(join(graph, "@openai/codex"), { name: "@openai/codex", version: "0.160.0", bin: { codex: "bin/codex.js" }, optionalDependencies: codexOptional }); + const runtime = writePackage(join(graph, "@openai/codex"), { name: "@openai/codex", version: "0.170.0", bin: { codex: "bin/codex.js" }, optionalDependencies: codexOptional }); mkdirSync(join(runtime, "bin")); writeFileSync(join(runtime, "bin/codex.js"), "// official JavaScript fixture, never executed\n"); mkdirSync(join(runtime, "vendor")); writeFileSync(join(runtime, "vendor/codex"), "producer fallback binary fixture, never executed"); - const producer = writePackage(join(graph, "@openai/codex-linux-x64"), { name: "@openai/codex", version: "0.160.0-linux-x64", os: ["linux"], cpu: ["x64"] }); + const producer = writePackage(join(graph, "@openai/codex-linux-x64"), { name: "@openai/codex", version: "0.170.0-linux-x64", os: ["linux"], cpu: ["x64"] }); mkdirSync(join(producer, "vendor")); writeFileSync(join(producer, "vendor/codex"), "producer optional binary fixture, never executed"); - const nested = writePackage(join(bridge, "node_modules/@openai/codex-darwin-arm64"), { name: "@openai/codex", version: "0.160.0-darwin-arm64", os: ["darwin"], cpu: ["arm64"] }); + const nested = writePackage(join(bridge, "node_modules/@openai/codex-darwin-arm64"), { name: "@openai/codex", version: "0.170.0-darwin-arm64", os: ["darwin"], cpu: ["arm64"] }); writePackage(join(graph, "unrelated-linux-x64"), { name: "unrelated-linux-x64", version: "1.0.0" }); const profiles = [{ agent: "codex", ...profileData.profiles.codex }]; const publish = { name: "paperclip-codex-pack-fixture", version: "1.0.0", dependencies: { "@agentclientprotocol/codex-acp": "1.6.2" }, bundleDependencies: ["@agentclientprotocol/codex-acp"] }; @@ -206,7 +206,7 @@ test("published Claude bridge pins its qualified SDK and provider dependency clo serverPackage.bundleDependencies, rootPackage, profileData, ); assert.deepEqual(installManifest.overrides["@agentclientprotocol/claude-agent-acp@0.73.0"], { - "@anthropic-ai/claude-agent-sdk": "0.3.286", + "@anthropic-ai/claude-agent-sdk": "0.3.328", "@agentclientprotocol/sdk": "1.4.0", zod: "4.4.3", }); @@ -322,7 +322,7 @@ test("Codex bundle validation fails before deleting producer binaries for altere const file = join(runtime, "package.json"), original = JSON.parse(readFileSync(file, "utf8")); writeFileSync(file, JSON.stringify({ ...original, version: "0.156.1" })); assert.throws(() => stageBundledProviderOptionalDependencies(directory, publish, profiles), /runtime version mismatch/); - writeFileSync(file, JSON.stringify({ ...original, optionalDependencies: { ...codexOptional, "@openai/codex-untrusted": "0.160.0" } })); + writeFileSync(file, JSON.stringify({ ...original, optionalDependencies: { ...codexOptional, "@openai/codex-untrusted": "0.170.0" } })); assert.throws(() => stageBundledProviderOptionalDependencies(directory, publish, profiles), /not qualified/); writeFileSync(file, JSON.stringify(original)); const missing = { ...original }; delete missing.optionalDependencies; @@ -338,7 +338,7 @@ test("Codex bundle validation fails before deleting producer binaries for altere test("Codex stripping rejects linked native payloads and wrapper fallback directories without touching external files", (t) => { const { directory, runtime, producer, profiles, publish, writePackage } = codexFixture(t); - const outside = writePackage(join(directory, "outside"), { name: "@openai/codex", version: "0.160.0-linux-x64", os: ["linux"], cpu: ["x64"] }); + const outside = writePackage(join(directory, "outside"), { name: "@openai/codex", version: "0.170.0-linux-x64", os: ["linux"], cpu: ["x64"] }); rmSync(producer, { recursive: true }); symlinkSync(outside, producer, "dir"); assert.throws(() => stageBundledProviderOptionalDependencies(directory, publish, profiles), /escapes its producer graph/); rmSync(producer); rmSync(join(runtime, "vendor"), { recursive: true }); symlinkSync(outside, join(runtime, "vendor"), "dir"); @@ -591,7 +591,7 @@ test("server package staging applies every bundled runtime patch and preserves t mkdirSync(fixtureArtifacts); const nativePackage = join(fixtureArtifacts, "@openai/codex-linux-x64"); mkdirSync(join(nativePackage, "vendor"), { recursive: true }); - writeFileSync(join(nativePackage, "package.json"), JSON.stringify({ name: "@openai/codex", version: "0.160.0-linux-x64", os: ["linux"], cpu: ["x64"] })); + writeFileSync(join(nativePackage, "package.json"), JSON.stringify({ name: "@openai/codex", version: "0.170.0-linux-x64", os: ["linux"], cpu: ["x64"] })); writeFileSync(join(nativePackage, "vendor/codex"), "producer host fixture; never executed"); mkdirSync(join(fixtureSourceRoot, "packages/paperclip-runner/src/drivers/acpx"), { recursive: true }); writeFileSync(join(fixtureSourceRoot, "package.json"), JSON.stringify(rootPackage)); diff --git a/scripts/tests/native-cleanup-paginated-codex.mjs b/scripts/tests/native-cleanup-paginated-codex.mjs index 0636e7f2657..c5d24ea3b77 100644 --- a/scripts/tests/native-cleanup-paginated-codex.mjs +++ b/scripts/tests/native-cleanup-paginated-codex.mjs @@ -1,7 +1,7 @@ // Opt-in real Codex qualification; no model turn or live account data. // Run from the repository root: // node --import ./server/node_modules/tsx/dist/loader.mjs scripts/tests/native-cleanup-paginated-codex.mjs -// PAPERCLIP_TEST_CODEX_BINARY may select the exact installed Codex 0.160.0 binary. +// PAPERCLIP_TEST_CODEX_BINARY may select the exact installed Codex 0.170.0 binary. // Fresh synthetic fixture directories are retained for inspection; never reuse live homes. import { spawn, execFileSync } from "node:child_process"; import { @@ -26,10 +26,10 @@ if ( execFileSync(codexBinary, ["--version"], { encoding: "utf8", timeout: 10000, - }).trim() !== "codex-cli 0.160.0" + }).trim() !== "codex-cli 0.170.0" ) { throw new Error( - "This opt-in qualification requires Codex CLI 0.160.0. Requalify deliberately before changing the pin.", + "This opt-in qualification requires Codex CLI 0.170.0. Requalify deliberately before changing the pin.", ); } const home = await mkdtemp(join(tmpdir(), "paperclip-paginated-probe-")); @@ -132,7 +132,7 @@ const lines = timestamp, cwd: home, originator: "codex", - cli_version: "0.160.0", + cli_version: "0.170.0", source: "cli", model_provider: "openai", selected_capability_roots: [], diff --git a/scripts/tests/native-provider-startup-codex.mjs b/scripts/tests/native-provider-startup-codex.mjs index 4b4eeab7d9a..34a506d291c 100644 --- a/scripts/tests/native-provider-startup-codex.mjs +++ b/scripts/tests/native-provider-startup-codex.mjs @@ -88,7 +88,7 @@ if (args.length === 0 || (args.length === 1 && args[0] === "--help")) { }).trim(); assert.equal( version, - "codex-cli 0.160.0", + "codex-cli 0.170.0", "qualified_codex_version_required", ); const ledger = join(fixture, "provider-process-starts.txt"); @@ -309,7 +309,7 @@ if (args.length === 0 || (args.length === 1 && args[0] === "--help")) { kind: "codex", provider: "codex", driver: "codex_app_server", - providerVersion: "0.160.0", + providerVersion: "0.170.0", command: shim, args: [ "--cd", diff --git a/server/scripts/verify-agent-commentary-live.ts b/server/scripts/verify-agent-commentary-live.ts index d408ecf9514..fc2855768ff 100644 --- a/server/scripts/verify-agent-commentary-live.ts +++ b/server/scripts/verify-agent-commentary-live.ts @@ -97,7 +97,7 @@ try { runnerEnvironment: { ...process.env, CODEX_HOME: codexHome }, useRunnerd: true, onLog, runnerExecutionTarget: remote?.target, runnerIngressAuthorized: Boolean(remote), runnerRemoteBinaryPath: remote ? process.env.PAPERCLIP_LIVE_LINUX_RUNNER : undefined, - runnerRemoteCodexNpmSpec: remote ? "@openai/codex@0.160.0" : undefined, + runnerRemoteCodexNpmSpec: remote ? "@openai/codex@0.170.0" : undefined, managedAiCredentialHome: codexHome, }).catch((error) => { throw new Error(redactSensitiveText(log.slice(-3000)), { cause: error }); }); } diff --git a/server/src/__tests__/adapter-registry.test.ts b/server/src/__tests__/adapter-registry.test.ts index edd989aee65..d9baf150c42 100644 --- a/server/src/__tests__/adapter-registry.test.ts +++ b/server/src/__tests__/adapter-registry.test.ts @@ -408,7 +408,7 @@ describe("server adapter registry", () => { const expectedCodexInstall = `if ! command -v 'codex' >/dev/null 2>&1; then ${buildSandboxNpmInstallCommand("@openai/codex")}; fi`; const expectedGeminiInstall = `if ! command -v 'gemini' >/dev/null 2>&1; then ${buildSandboxNpmInstallCommand("@google/gemini-cli")}; fi`; const expectedOpenCodeInstall = `if ! command -v 'opencode' >/dev/null 2>&1; then ${buildSandboxNpmInstallCommand("opencode-ai")}; fi`; - const expectedRunnerCodexInstall = `if ! command -v 'codex' >/dev/null 2>&1; then ${buildSandboxNpmInstallCommand("@openai/codex@0.160.0")}; fi`; + const expectedRunnerCodexInstall = `if ! command -v 'codex' >/dev/null 2>&1; then ${buildSandboxNpmInstallCommand("@openai/codex@0.170.0")}; fi`; const expectedRunnerOpenCodeInstall = `if ! command -v 'opencode' >/dev/null 2>&1; then ${buildSandboxNpmInstallCommand("opencode-ai@1.18.34")}; fi`; expect(findActiveServerAdapter("claude_local")?.getRuntimeCommandSpec?.({})).toEqual({ diff --git a/server/src/__tests__/helpers/verify-assigned-tool-results-live.ts b/server/src/__tests__/helpers/verify-assigned-tool-results-live.ts index 9d8f8ef7633..f21d2f1aade 100644 --- a/server/src/__tests__/helpers/verify-assigned-tool-results-live.ts +++ b/server/src/__tests__/helpers/verify-assigned-tool-results-live.ts @@ -56,7 +56,7 @@ try { let retrieved = ""; const started = Date.now(); bundle = createRunnerdCodexTransport({ - codexCommand: process.env.PAPERCLIP_LIVE_CODEX_COMMAND ?? fileURLToPath(new URL("../../../../node_modules/.pnpm/@openai+codex@0.160.0/node_modules/@openai/codex/bin/codex.js", import.meta.url)), + codexCommand: process.env.PAPERCLIP_LIVE_CODEX_COMMAND ?? fileURLToPath(new URL("../../../../node_modules/.pnpm/@openai+codex@0.170.0/node_modules/@openai/codex/bin/codex.js", import.meta.url)), sourceCodexHome: codexHome, environment: { ...process.env, CODEX_HOME: codexHome }, disableCodexProjectInstructions: true, stateDirectory: join(root, "runner"), diff --git a/server/src/adapters/registry.ts b/server/src/adapters/registry.ts index a6f822946fc..adc1304bd10 100644 --- a/server/src/adapters/registry.ts +++ b/server/src/adapters/registry.ts @@ -642,7 +642,7 @@ const paperclipRunnerAdapter: ServerAdapterModule = { "opencode", `opencode-ai@${QUALIFIED_OPENCODE_RUNNER_VERSION}`, ) - : buildNpmRuntimeCommandSpec(config, "codex", "@openai/codex@0.160.0"), + : buildNpmRuntimeCommandSpec(config, "codex", "@openai/codex@0.170.0"), agentConfigurationDoc: "# Paperclip Runner\n\nAdapter: paperclip_runner\n\nRuns Codex, OpenCode, Claude Managed, AWS AgentCore, or ACPX Claude/Grok Build/Cursor/Pi through the Rust Paperclip runner and authenticated PRP transport. Pi accepts an explicit provider/model ID and uses the company credentials bound to the agent environment. GitHub Copilot requires a saved GitHub token and an explicitly selected available model. Managed providers use company-scoped qualified profiles, explicit retention acknowledgement, and spend limits. A board operator creates each Claude Managed (Anthropic managed agent) profile through POST /api/companies/{companyId}/managed-agent-profiles; agent credentials cannot create, qualify or list one.\n", getConfigSchema: () => ({ diff --git a/server/src/services/native-runtime/acpx-qualification.test.ts b/server/src/services/native-runtime/acpx-qualification.test.ts index dda76180998..fbcd0de0fd7 100644 --- a/server/src/services/native-runtime/acpx-qualification.test.ts +++ b/server/src/services/native-runtime/acpx-qualification.test.ts @@ -88,32 +88,50 @@ describe("host ACPX qualification admission", () => { expect(resolvePaperclipRunnerNativeProviderInput({ backend: "acpx_runtime", adapterConfig })) .toMatchObject({ acpxAgent, model: "explicit-new-model" }); }); - it("names the Claude Code gap when the bundled SDK predates the model's minimum", () => { - expect(QUALIFIED_ACPX_PROFILES.claude.agentRuntimeVersion).toBe("0.3.286"); - for (const model of ["claude-fable-5-2", "claude-fable-5-2[1m]"]) { - expect(() => resolvePaperclipRunnerProviderProfile({ provider: "acpx", acpxAgent: "claude", model })) - .toThrow(expect.objectContaining({ - code: "paperclip_runner_claude_cli_version_incompatible", - message: expect.stringContaining("requires Claude Code 2.1.321 or newer; this Paperclip Runner bundles Claude Code 2.1.286"), - })); - } - for (const model of ["claude-opus-5-5", "claude-sonnet-5-5", "claude-fable-5-1"]) { + it("admits Fable 5.2 because the bundled Agent SDK ships Claude Code 2.1.328", () => { + expect(QUALIFIED_ACPX_PROFILES.claude.agentRuntimeVersion).toBe("0.3.328"); + for (const model of ["claude-fable-5-2", "claude-fable-5-2[1m]", "claude-opus-5-5", "claude-sonnet-5-5", "claude-fable-5-1"]) { expect(resolvePaperclipRunnerProviderProfile({ provider: "acpx", acpxAgent: "claude", model })) .toMatchObject({ acpxAgent: "claude", model }); } }); - it("names the Codex gap when the qualified ACPX runtime predates the model's minimum", () => { - expect(QUALIFIED_ACPX_PROFILES.codex.agentRuntimeVersion).toBe("0.160.0"); - for (const model of ["gpt-6.2-sol", "gpt-6.2-astra"]) { - expect(() => resolvePaperclipRunnerProviderProfile({ provider: "acpx", acpxAgent: "codex", model })) + it("admits GPT-6.2 because the qualified ACPX runtime is Codex 0.170.0", () => { + expect(QUALIFIED_ACPX_PROFILES.codex.agentRuntimeVersion).toBe("0.170.0"); + for (const model of ["gpt-6.2-sol", "gpt-6.2-astra", "gpt-6.1-sol", "gpt-6-astra"]) { + expect(resolvePaperclipRunnerProviderProfile({ provider: "acpx", acpxAgent: "codex", model })) + .toMatchObject({ acpxAgent: "codex", model }); + } + }); + it("names the CLI gap when a bundled runtime predates the model's minimum", async () => { + vi.resetModules(); + vi.doMock("../../vendor/paperclip-runner/index.js", async (importOriginal) => { + const original = await importOriginal(); + const olderRuntime = { claude: "0.3.286", codex: "0.160.0" } as Record; + return { + ...original, + resolveQualifiedAcpxProfile: (agent: string, model: string) => { + const profile = original.resolveQualifiedAcpxProfile(agent as never, model); + return olderRuntime[agent] ? { ...profile, agentRuntimeVersion: olderRuntime[agent] } : profile; + }, + }; + }); + try { + const { resolvePaperclipRunnerProviderProfile: resolveWithOlderRuntime } = await import("./provider-profile.js"); + expect(() => resolveWithOlderRuntime({ provider: "acpx", acpxAgent: "claude", model: "claude-fable-5-2" })) + .toThrow(expect.objectContaining({ + code: "paperclip_runner_claude_cli_version_incompatible", + message: expect.stringContaining("requires Claude Code 2.1.321 or newer; this Paperclip Runner bundles Claude Code 2.1.286"), + })); + expect(() => resolveWithOlderRuntime({ provider: "acpx", acpxAgent: "codex", model: "gpt-6.2-sol" })) .toThrow(expect.objectContaining({ code: "paperclip_runner_codex_cli_version_incompatible", message: expect.stringContaining("requires Codex 0.169.1 or newer; this Paperclip Runner bundles Codex 0.160.0"), })); - } - for (const model of ["gpt-6.1-sol", "gpt-6-astra"]) { - expect(resolvePaperclipRunnerProviderProfile({ provider: "acpx", acpxAgent: "codex", model })) - .toMatchObject({ acpxAgent: "codex", model }); + expect(resolveWithOlderRuntime({ provider: "acpx", acpxAgent: "codex", model: "gpt-6.1-sol" })) + .toMatchObject({ acpxAgent: "codex", model: "gpt-6.1-sol" }); + } finally { + vi.doUnmock("../../vendor/paperclip-runner/index.js"); + vi.resetModules(); } }); it("requires an explicit Codex ACP selection", () => { diff --git a/server/src/services/native-runtime/codex-model-fallback.test.ts b/server/src/services/native-runtime/codex-model-fallback.test.ts index 71a72bca341..7dd5645c6ee 100644 --- a/server/src/services/native-runtime/codex-model-fallback.test.ts +++ b/server/src/services/native-runtime/codex-model-fallback.test.ts @@ -24,17 +24,22 @@ describe("bounded Codex model fallback", () => { expect(unavailable.mock.calls).toEqual([["gpt-6-sol"], ["gpt-5.6-sol"]]); }); - it("moves GPT-6.2 to the newest same-class model the pinned 0.160.0 CLI accepts", () => { + it("moves GPT-6.2 to the newest same-class model an older 0.160.0 CLI accepts", () => { expect(codexModelFallbackCandidates("gpt-6.2-sol")).toEqual(["gpt-6.1-sol", "gpt-6-sol", "gpt-5.6-sol"]); expect(codexModelFallbackCandidates("gpt-6.2-astra")).toEqual(["gpt-6-astra", "gpt-5.6-sol"]); expect(compatibleCodexModel("gpt-6.2-sol", "0.160.0")).toBe("gpt-6.1-sol"); expect(compatibleCodexModel("gpt-6.2-astra", "0.160.0")).toBe("gpt-6-astra"); }); + it("keeps GPT-6.2 on the pinned 0.170.0 CLI", () => { + expect(compatibleCodexModel("gpt-6.2-sol", "0.170.0")).toBe("gpt-6.2-sol"); + expect(compatibleCodexModel("gpt-6.2-astra", "0.170.0")).toBe("gpt-6.2-astra"); + }); + it.each([ ["gpt-6.1-sol", "0.159.0"], ["gpt-6-sol", "0.157.0"], ["gpt-5.6-sol", "0.156.0"], ["team-model", "0.156.0"], [null, "0.156.0"], ["gpt-6.1-sol", null], - ["gpt-6.1-sol", "0.148.9"], ["gpt-6.1-sol", "0.161.0"], ["gpt-6.1-sol", "0.160.0-alpha.1"], + ["gpt-6.1-sol", "0.148.9"], ["gpt-6.1-sol", "0.171.0"], ["gpt-6.1-sol", "0.160.0-alpha.1"], ])("preserves %s on %s when no safe startup substitution applies", (model, version) => { expect(compatibleCodexModel(model, version)).toBe(model); }); @@ -86,7 +91,7 @@ describe("remote model compatibility preflight", () => { }); it.each([ - ["codex-cli 0.148.9", {}], ["codex-cli 0.161.0", {}], ["codex-cli 0.160.0-alpha.1", {}], + ["codex-cli 0.148.9", {}], ["codex-cli 0.171.0", {}], ["codex-cli 0.160.0-alpha.1", {}], ["codex-cli 0.156.0\ncodex-cli 0.160.0", {}], ["codex-cli 0.156.0", { timedOut: true }], ["codex-cli 0.156.0", { exitCode: 1 }], ])("keeps the launch verifier authoritative for invalid probes: %s %j", async (stdout, overrides) => { diff --git a/server/src/services/native-runtime/codex-runtime-compatibility.test.ts b/server/src/services/native-runtime/codex-runtime-compatibility.test.ts index 81159c6653e..b78878f36a3 100644 --- a/server/src/services/native-runtime/codex-runtime-compatibility.test.ts +++ b/server/src/services/native-runtime/codex-runtime-compatibility.test.ts @@ -15,13 +15,13 @@ describe("remote Codex compatibility window", () => { vi.useRealTimers(); } }); - it.each(["0.149.0", "0.149.1", "0.150.0", "0.150.1", "0.151.0", "0.152.1", "0.153.4", "0.154.0", "0.155.1", "0.156.0", "0.156.99", "0.157.0", "0.158.0", "0.159.3", "0.160.0", "0.160.99"])( + it.each(["0.149.0", "0.149.1", "0.150.0", "0.150.1", "0.151.0", "0.152.1", "0.153.4", "0.154.0", "0.155.1", "0.156.0", "0.156.99", "0.157.0", "0.158.0", "0.159.3", "0.160.0", "0.160.99", "0.161.0", "0.165.0", "0.169.1", "0.170.0", "0.170.99"])( "accepts stable supported version %s", (version) => { expect(isSupportedRemoteCodexVersion(version)).toBe(true); expect(parseCodexCliVersion(`codex-cli ${version}\n`)).toBe(version); }, ); - it.each(["0.148.99", "0.100.0", "0.161.0", "0.162.0", "0.999.0", "1.0.0", "0.160.0-alpha.1", "0.149.0-dev", "0.160.0+custom", "00.149.0", "0.149", "0.149.9007199254740992", ""])( + it.each(["0.148.99", "0.100.0", "0.171.0", "0.172.0", "0.999.0", "1.0.0", "0.160.0-alpha.1", "0.149.0-dev", "0.160.0+custom", "00.149.0", "0.149", "0.149.9007199254740992", ""])( "rejects unsupported or ambiguous version %s", (version) => { expect(isSupportedRemoteCodexVersion(version)).toBe(false); }, diff --git a/server/src/services/native-runtime/codex-runtime-compatibility.ts b/server/src/services/native-runtime/codex-runtime-compatibility.ts index 940222bb3ce..760ae2f2da3 100644 --- a/server/src/services/native-runtime/codex-runtime-compatibility.ts +++ b/server/src/services/native-runtime/codex-runtime-compatibility.ts @@ -6,7 +6,7 @@ * Do not query a registry at startup. */ export const REMOTE_CODEX_MINIMUM_VERSION = "0.149.0"; -export const REMOTE_CODEX_MAXIMUM_VERSION_EXCLUSIVE = "0.161.0"; +export const REMOTE_CODEX_MAXIMUM_VERSION_EXCLUSIVE = "0.171.0"; export const REMOTE_CODEX_SUPPORTED_RANGE = `>=${REMOTE_CODEX_MINIMUM_VERSION} <${REMOTE_CODEX_MAXIMUM_VERSION_EXCLUSIVE}`; diff --git a/server/src/services/native-runtime/native-session-executor.test.ts b/server/src/services/native-runtime/native-session-executor.test.ts index 392b0162d98..4b50f3e284f 100644 --- a/server/src/services/native-runtime/native-session-executor.test.ts +++ b/server/src/services/native-runtime/native-session-executor.test.ts @@ -3521,7 +3521,7 @@ describe("remote provider pack manifest", () => { const payload = { pins: { nodeMinimum: "24.11.0", - codex: "0.160.0", + codex: "0.170.0", opencode: "1.18.34", acpx: "0.22.0", claudeAcp: "0.73.0", @@ -5356,7 +5356,7 @@ describe("remote preinstalled executable discovery", () => { const shim = '#!/bin/sh\ncat "$(dirname "$0")/version.txt"\nprintf "%s\\n" "$@"\n'; await writeFile(source, shim, { mode: 0o755 }); - await writeFile(join(installation, "version.txt"), "codex-cli 0.160.0\n"); + await writeFile(join(installation, "version.txt"), "codex-cli 0.170.0\n"); // Existing deployments may already have the old symlink. Never write // through it into the shared installation while upgrading the launcher. await symlink(source, target); @@ -5369,7 +5369,7 @@ describe("remote preinstalled executable discovery", () => { execFileSync(target, ["--version", "argument with 'quotes'"], { encoding: "utf8", }), - ).toBe("codex-cli 0.160.0\n--version\nargument with 'quotes'\n"); + ).toBe("codex-cli 0.170.0\n--version\nargument with 'quotes'\n"); expect(await readFile(source, "utf8")).toBe(shim); } expect(await readdir(join(root, "workspace", "bin"))).toEqual(["codex"]); @@ -18623,7 +18623,7 @@ describe("runnerd provider runtime wiring", () => { schema: "paperclip-runner/runnerd-build-metadata/v1", binaryName: "paperclip-runnerd", packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], - }) : request.args[0] === "--version" ? "codex-cli 0.160.0" + }) : request.args[0] === "--version" ? "codex-cli 0.170.0" : script.includes("base64") && script.includes("runner-state.json") ? Buffer.from(JSON.stringify(runnerState)).toString("base64") : script.includes("base64") ? Buffer.from(JSON.stringify(providerState)).toString("base64") : script.includes("cat --") ? `nonce\n123\n2026-09-19T10:00:00.000Z\n${identity.runnerInstanceId}\nlinux:abcd-1234:100\n` : ""; @@ -18937,7 +18937,7 @@ describe("runnerd provider runtime wiring", () => { schema: "paperclip-runner/runnerd-build-metadata/v1", binaryName: "paperclip-runnerd", packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], - }) : request.args[0] === "--version" ? "codex-cli 0.160.0" : script.includes("base64") + }) : request.args[0] === "--version" ? "codex-cli 0.170.0" : script.includes("base64") ? Buffer.from(JSON.stringify({ ...identity, lifecycle: "turn_active", outbox: [{ id: 2205 }], pendingTerminalDelivery: null, nextSourceSeq: mode === "progressing" ? 2345 : 2205, ackedSourceSeq: 2204, lastControllerCommandSeq: 61 })).toString("base64") : script.includes("cat --") ? `nonce\n1806\n2026-11-13T08:30:36.187Z\n${identity.runnerInstanceId}\nlinux:abcd-1234:100\n` : "" }; @@ -19030,7 +19030,7 @@ describe("runnerd provider runtime wiring", () => { schema: "paperclip-runner/runnerd-build-metadata/v1", binaryName: "paperclip-runnerd", packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], - }) : request.args[0] === "--version" ? "codex-cli 0.160.0" : request.args[1]?.includes("base64") + }) : request.args[0] === "--version" ? "codex-cli 0.170.0" : request.args[1]?.includes("base64") ? Buffer.from(JSON.stringify({ ...identity, lifecycle: "ready", outbox: [], pendingTerminalDelivery: null })).toString("base64") : request.args[1]?.includes("cat --") ? `nonce\n123\n2026-09-19T10:00:00.000Z\n${identity.runnerInstanceId}\nlinux:abcd-1234:100\n` : "" })); const revalidate = vi.fn(async () => undefined); @@ -19949,7 +19949,7 @@ describe("runnerd provider runtime wiring", () => { packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], }) }; - if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.160.0", stderr: "" }; + if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.170.0", stderr: "" }; // The archive script and the harness inspection run for real against // the local directory that stands in for the sandbox filesystem. if (command.args?.[1]?.includes("base64")) { @@ -20044,7 +20044,7 @@ describe("runnerd provider runtime wiring", () => { packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], }) }; - if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.160.0", stderr: "" }; + if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.170.0", stderr: "" }; if (command.args?.[1]?.includes("base64")) { try { return { exitCode: 0, timedOut: false, stdout: execFileSync("sh", command.args, { encoding: "utf8" }), stderr: "" }; } catch { return { exitCode: 1, timedOut: false, stdout: "", stderr: "" }; } @@ -22391,7 +22391,7 @@ describe("runnerd provider runtime wiring", () => { command.args?.[0] === "--build-metadata" ? JSON.stringify({ schema: "paperclip-runner/runnerd-build-metadata/v1", binaryName: "paperclip-runnerd", packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], - }) : command.args?.[0] === "--version" ? "codex-cli 0.160.0" : "" }; + }) : command.args?.[0] === "--version" ? "codex-cli 0.170.0" : "" }; }); const controllerArtifact = join(isolatedStateDirectory, "backup-fixture-runnerd"); await writeFile(controllerArtifact, "fixture bootstrap artifact"); @@ -22449,7 +22449,7 @@ describe("runnerd provider runtime wiring", () => { command.args?.[0] === "--build-metadata" ? JSON.stringify({ schema: "paperclip-runner/runnerd-build-metadata/v1", binaryName: "paperclip-runnerd", packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], - }) : command.args?.[0] === "--version" ? "codex-cli 0.160.0" : "" }; + }) : command.args?.[0] === "--version" ? "codex-cli 0.170.0" : "" }; }); const controllerArtifact = join(isolatedStateDirectory, "backup-fixture-runnerd"); await writeFile(controllerArtifact, "fixture bootstrap artifact"); @@ -22521,7 +22521,7 @@ describe("runnerd provider runtime wiring", () => { packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], }) }; - if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.160.0", stderr: "" }; + if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.170.0", stderr: "" }; if (command.args?.[1]?.includes("base64")) { try { return { exitCode: 0, timedOut: false, stdout: execFileSync("sh", command.args, { encoding: "utf8" }), stderr: "" }; } catch { return { exitCode: 1, timedOut: false, stdout: "", stderr: "" }; } @@ -22684,7 +22684,7 @@ describe("runnerd provider runtime wiring", () => { packageName: "@paperclipai/paperclip-runner", binaryContractVersion: 2, durableSessionCapabilities: ["unlimited_runtime", "connection_lease_renewal"], prpTransportModes: ["listen_ws"], }) }; - if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.160.0", stderr: "" }; + if (command.args?.[0] === "--version") return { exitCode: 0, timedOut: false, stdout: "codex-cli 0.170.0", stderr: "" }; if (command.args?.[1]?.includes("base64")) { try { return { exitCode: 0, timedOut: false, stdout: execFileSync("sh", command.args, { encoding: "utf8" }), stderr: "" }; } catch { return { exitCode: 1, timedOut: false, stdout: "", stderr: "" }; } @@ -22762,7 +22762,7 @@ describe("runnerd provider runtime wiring", () => { }), stderr: "", }; if (command.args?.[0] === "--version") return { - exitCode: 0, timedOut: false, stdout: "codex-cli 0.160.0", stderr: "", + exitCode: 0, timedOut: false, stdout: "codex-cli 0.170.0", stderr: "", }; if (command.args?.[1]?.includes("base64")) return { exitCode: 1, timedOut: false, stdout: "", stderr: "", @@ -22889,7 +22889,7 @@ describe("runnerd provider runtime wiring", () => { }), stderr: "", }; if (command.args?.[0] === "--version") return { - exitCode: 0, timedOut: false, stdout: "codex-cli 0.160.0", stderr: "", + exitCode: 0, timedOut: false, stdout: "codex-cli 0.170.0", stderr: "", }; if (command.args?.includes("paperclip-remote-home")) return { exitCode: 0, timedOut: false, stdout: "/home/executor\n", stderr: "", @@ -23155,7 +23155,7 @@ describe("runnerd provider runtime wiring", () => { }), stderr: "", }; if (command.args?.[0] === "--version") return { - exitCode: 0, timedOut: false, stdout: "codex-cli 0.160.0", stderr: "", + exitCode: 0, timedOut: false, stdout: "codex-cli 0.170.0", stderr: "", }; if (command.args?.[1]?.includes("base64")) return { exitCode: 1, timedOut: false, stdout: "", stderr: "", @@ -23255,10 +23255,10 @@ describe("runnerd provider runtime wiring", () => { it.each([ ...["current", "preinstalled-exact", "preinstalled-mismatch", "preinstalled-error", "preinstalled-timeout", "preinstalled-explicit", "preinstalled-explicit-mismatch", "preinstalled-explicit-discover-fails", "stale", "missing", "retained", "retained-mismatch", "retained-error", "retained-timeout", "retained-explicit"] - .map((image) => ({ image, version: "0.160.0" })), + .map((image) => ({ image, version: "0.170.0" })), ...["0.149.0", "0.149.1", "0.153.4", "0.156.0", "0.160.1"] .map((version) => ({ image: "current", version })), - ...["0.148.9", "0.161.0", "1.0.0", "0.160.0-alpha.1", "unknown"] + ...["0.148.9", "0.171.0", "1.0.0", "0.160.0-alpha.1", "unknown"] .map((version) => ({ image: "current", version })), ])("uses shared Codex and the server-owned replacement artifact (image=$image, Codex=$version)", async ({ image, version }) => { const retained = image.startsWith("retained"); @@ -23353,7 +23353,7 @@ describe("runnerd provider runtime wiring", () => { await expect(transport.controlPlaneRegistration({})).rejects.toThrow( "reached-preinstalled-codex-verification", ); - if (version !== "0.160.0") { + if (version !== "0.170.0") { expect(onLog).toHaveBeenCalledWith("stderr", expect.stringContaining(`using installed Codex ${version === "unknown" || version.includes("alpha") ? "unrecognized version" : version}`)); } if (needsReplacement) { diff --git a/server/src/services/native-runtime/native-session-resume.test.ts b/server/src/services/native-runtime/native-session-resume.test.ts index 4f82fe98a7b..1d26ebad290 100644 --- a/server/src/services/native-runtime/native-session-resume.test.ts +++ b/server/src/services/native-runtime/native-session-resume.test.ts @@ -314,6 +314,60 @@ describe("a source whose saved provider session the runner proved incompatible", }); }); +describe("a session saved by the previous Claude or Codex ACPX runtime", () => { + // The previous release bundled Agent SDK 0.3.286 and Codex 0.160.0 behind the + // same bridge command digests. The saved provider records that runtime, so the + // next run after the upgrade starts a fresh provider session in the same + // workspace instead of resuming a conversation the new runtime cannot restore. + const acpxExecution = (runId: string, acpxAgent: "claude" | "codex", model: string) => + buildNativeExecutionInput({ + companyId, + runId, + issue: { id: issueId, identifier: "DOT-2", title: "Test", description: null, workMode: "standard" }, + taskPrompt: "Only the current turn", + agentId, + workspace: { id: runId, cwd: "/workspace", repoUrl: null, repoRef: null, branchName: null }, + normalizedSessionId, + provider: "acpx", + acpxAgent, + model, + acpxPermissionMode: "approve-all", + completionContract: execution(runId).completionContract, + runtimeContext: nativeRuntimeContextFixture(), + }); + const sourceWith = (nativeExecutionInput: ReturnType) => { + const source = previousRun(); + return { ...source, runnerProfileJson: { ...source.runnerProfileJson, nativeExecutionInput } }; + }; + + it.each([ + ["claude", "claude-opus-5-5", "0.3.286"], + ["codex", "gpt-6.1-sol", "0.160.0"], + ] as const)("starts a fresh %s provider session in the same workspace", (acpxAgent, model, priorRuntime) => { + const current = acpxExecution(currentRunId, acpxAgent, model); + const sameRelease = sourceWith(acpxExecution(previousRunId, acpxAgent, model)); + expect(rebindNativeSessionCheckpoint({ previousRun: sameRelease, currentExecution: current })).not.toBeNull(); + + const saved = acpxExecution(previousRunId, acpxAgent, model); + const profile = (saved.provider as { profile: { agentRuntimeVersion: string | null } }).profile; + expect(profile.agentRuntimeVersion).not.toBe(priorRuntime); + profile.agentRuntimeVersion = priorRuntime; + const source = sourceWith(saved); + expect(rebindNativeSessionCheckpoint({ previousRun: source, currentExecution: current })).toBeNull(); + + const buildExecution = vi.fn(({ normalizedSessionId: sessionId, resumedSession }) => { + const built = acpxExecution(currentRunId, acpxAgent, model); + built.session.normalizedSessionId = sessionId; + built.task.prompt = resumedSession ? "wake delta" : "original goal and complete handoff"; + return built; + }); + const result = buildNativeExecutionWithCheckpoint({ previousRun: source, normalizedSessionId, buildExecution }); + expect(result.checkpoint).toBeNull(); + expect(result.execution.task.prompt).toContain("complete handoff"); + expect(result.execution.workspace).toEqual(current.workspace); + }); +}); + describe("a source whose provider state was not saved after its result was accepted", () => { const unsaved = { [NATIVE_PROVIDER_STATE_UNSAVED_KEY]: { code: NATIVE_PROVIDER_STATE_INCOMPATIBLE, reason: "harness_backup_not_saved", recordedAt: "2026-11-11T00:00:00.000Z" } }; diff --git a/tests/runner-e2e/source-sdk-public-inputs.json b/tests/runner-e2e/source-sdk-public-inputs.json index 2f9e524c842..27b97e43424 100644 --- a/tests/runner-e2e/source-sdk-public-inputs.json +++ b/tests/runner-e2e/source-sdk-public-inputs.json @@ -1,6 +1,6 @@ { "inputs": { - "package.json": "2213c21acb7ce340b07aa114c69974a266a0bad8", + "package.json": "0997306dd5a8166f862e0eeb9515b936b03f8460", "packages/plugins/sdk/package.json": "b7a4936e2803fd0d3b32dd7f17fc1ea86609ead0", "packages/plugins/sdk/src/bundlers.ts": "883bf3d9f2bd42877cfc0c3707cd882a6f6248d0", "packages/plugins/sdk/src/define-plugin.ts": "a99e07ce77ef72fcf1df1347346aacb8ba12e284",