Skip to content

fix: update ACP SDK to 2.2 and align protocol behavior - #710

Merged
benbrandt merged 2 commits into
mainfrom
fix/acp-sdk-2.2-compat
Oct 30, 2026
Merged

benbrandt merged 2 commits into
mainfrom
fix/acp-sdk-2.2-compat

Conversation

@benbrandt

@benbrandt benbrandt commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Upgrade @agentclientprotocol/sdk from 2.1.0 to 2.2.0 (schemas v1.28.0 and v2.0.0-alpha.11) and align the adapter with the intervening schema and protocol-documentation clarifications.

  • Remove JSON-RPC batching and release setup publication after individual response writes.
  • Reuse the Codex handshake across repeated ACP initialization and retain the previous capabilities after a failed repeat.
  • Validate absolute workspace paths and reject duplicate MCP server names, including sanitized-name collisions.
  • Reject v2 configuration value types that do not match advertised options.
  • Emit native absolute paths in v2 Git patches while preserving v1/AIR formatting.
  • Preserve arbitrary JSON in accepted v2 MCP form responses and validate built-in question answers per property.
  • Add regression coverage across both ACP versions where applicable.

Protocol review and follow-ups

This change does not claim full v2 conformance. Active-session teardown, resume snapshots, subagent directory reporting, authentication/MCP delegation, and extension/security work remain separately reviewable follow-ups.

Validation

  • npm run typecheck — passed, including examples.
  • npm test — 2,263 passed, 39 skipped.
  • npm run build — passed.
  • git diff --check — passed.
  • Real Codex smoke: npm run codex-test -- -p "Reply with exactly OK. Do not use tools or modify any files." -o summary — completed with end_turn.
  • Separate integration and opt-in E2E suites were not run.

@benbrandt
benbrandt merged commit 6f96fbe into main Oct 30, 2026
6 of 7 checks passed
@benbrandt
benbrandt deleted the fix/acp-sdk-2.2-compat branch October 30, 2026 15:17
benbrandt added a commit that referenced this pull request Oct 30, 2026
…#711)

## Summary

Follow up #710 with the session-close interaction and background-process
cleanup changes from the protocol review. Applies to ACP v1 and v2;
`session/delete` uses the same teardown path.

- Give session-scoped permission requests and elicitations a shared
cancellation owner, including idle/background interactions and
registered child sessions. Preserve caller cancellation and leave
request-scoped login interactions alone.
- Cancel pending interactions before waiting for runtime teardown and
reject new interactions while the owning session is closing.
- Stop Codex background processes before unsubscribe and before
responding to close, independently of AIR async-task display support.
Codex's unsubscribe only detaches the subscriber; delayed unload is not
a cleanup barrier.
- Share background-terminal pagination with the existing task tracker.
Read every page before terminating processes, and detect repeated
cursors.
- Clean up child processes only for ownership established by native
events/readbacks. Do not wait on unrelated metadata reads during close
or act on foreign ownership.
- Preserve the local session and subscriptions when process cleanup
fails, so close can be retried. A false termination result is checked
against the current process list rather than assumed to mean success.
- Make already-closed/unknown close requests succeed without unnecessary
Codex calls, and publish terminal task state only after successful
cleanup.

## Validation

- `npm run typecheck` — passed, including examples.
- `npm test` — 2,282 passed, 39 skipped.
- `npm run test:integration` — all 19 tests passed across 8 files.
- `npm run build` and `git diff --check` — passed.
- A new real-Codex integration test starts a long-lived shell process,
confirms it is alive, closes the session without AIR async-task support,
and confirms the OS process has exited when close responds.
- Real Codex smoke: `npm run codex-test -- -p "Reply with exactly OK. Do
not use tools or modify any files." -o summary` — completed with
`end_turn`.
- Opt-in E2E suite was not run.

## Remaining follow-ups

This is not a claim of complete v2 lifecycle conformance. The general
post-close notification fence, resume snapshots/metadata, setup response
ordering, and active-resume environment replacement remain separate
changes. Active-resume replacement also needs the spec decision about
in-flight operations using removed roots or MCP servers. No internal
review Markdown file is included.
EugeneTheDev pushed a commit that referenced this pull request Nov 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.6.0](v2.5.0...v2.6.0)
(2026-11-06)


### Features

* expose configured permission profiles as modes
([#395](#395))
([caf2e87](caf2e87))
* predict the follow-up prompt with thread/sample on the session thread
([#740](#740))
([f9cb470](f9cb470))
* show async Codex questions as elicitations
([#707](#707))
([cc57c7e](cc57c7e))
* update ACP SDK to 2.4 and align protocol behavior
([#727](#727))
([ab513aa](ab513aa))


### Bug Fixes

* clear stale entity metadata during ACP v2 replay
([#716](#716))
([580d8b9](580d8b9))
* defer startup interactions until session setup is delivered
([#714](#714))
([ad993bb](ad993bb))
* fence turn interrupt retries to the original prompt
([#723](#723))
([9c33f86](9c33f86))
* match vendor-prefixed gateway model ids such as OpenRouter's
([#731](#731))
([29195ec](29195ec))
* preserve sibling session metadata namespace fields
([#718](#718))
([3720341](3720341))
* publish complete configuration updates for session changes
([#715](#715))
([b7ac0bf](b7ac0bf))
* release the prompt suggestion thread and keep it minimal
([#709](#709))
([82ad58f](82ad58f))
* report verified standard subagent directories
([#722](#722))
([7d7e95a](7d7e95a))
* resynchronize current session metadata on ACP v2 resume
([#717](#717))
([927c480](927c480))
* scope authentication cancellation and initial status delivery
([#720](#720))
([e059ab7](e059ab7))
* show commands in Zed approval prompts
([#735](#735))
([cca2dca](cca2dca))
* skip the app-server restart when providers/set repeats the applied
config
([#728](#728))
([3b35338](3b35338))
* start the Codex app-server with the provider of the gateway routing
([#733](#733))
([cbcd446](cbcd446))
* suppress session messages after close
([#712](#712))
([85bf932](85bf932))
* synchronize resumed titles and reset replayed message metadata
([#713](#713))
([ef45a6d](ef45a6d))
* tear down session interactions and background processes on close
([#711](#711))
([1e89efa](1e89efa))
* update ACP SDK to 2.2 and align protocol behavior
([#710](#710))
([6f96fbe](6f96fbe))
* update codex to 0.166.0
([#734](#734))
([e53f23e](e53f23e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
mrmans0n added a commit to mrmans0n/codex-acp that referenced this pull request Nov 8, 2026
Upstream v2.6.0 adds an initialize-v2 test next to the downstream one (repeated initialize without
reinitializing Codex), which conflicted only by position. Both tests are kept; every added and
removed line of the patch is unchanged. Upstream's agentclientprotocol#710 path style for GitPatch (native absolute
paths for ACP v2, Git-relative paths by default) leaves the ACP v1 wrapper unchanged: the
client-neutral _meta.diffPatch still gets the same Git-relative patch as the AIR extension.
Adapted from 4ab2596.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant