Skip to content

agent_servers: Share ACP connection lifecycle across v1 and v2 - #65601

Merged
benbrandt merged 2 commits into
benbrandt/acp-v2-connection-auth-foundationfrom
benbrandt/acp-shared-client-runtime
Oct 14, 2026
Merged

benbrandt merged 2 commits into
benbrandt/acp-v2-connection-auth-foundationfrom
benbrandt/acp-shared-client-runtime

Conversation

@benbrandt

@benbrandt benbrandt commented Oct 14, 2026 •

Copy link
Copy Markdown
Member
  • Use one internal ClientRuntime for foreground queue/context dispatch and SDK I/O ownership. Keep typed v1/v2 builders, initialization, capabilities, auth requests and session semantics in their adapters; no generic protocol-version framework.
  • Share handle publication, cooperative owner shutdown and the idempotent cleanup awaited by both SDK close callbacks and transport-error paths.
  • Share startup-versus-process-exit races, the existing 250 ms error/exit preference, stdout/foreground/stderr exit draining and process watching. Adapters still decide how to publish their exit errors; v1 wait failures are now logged rather than held in an unobserved task result.
  • Reuse the child guard for both protocols, including failed or abandoned v1 startup. Give real v1 connections the same cooperative cleanup as v2 instead of immediately cancelling I/O/dispatch tasks when their owner drops. Existing raw test drivers retain their cancel-on-drop ownership.

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 14, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Oct 14, 2026
@benbrandt
benbrandt added this pull request to stack #65604 October 14, 2026 18:21
@benbrandt
benbrandt marked this pull request as ready for review October 14, 2026 18:23
@benbrandt
benbrandt requested a review from bennetbo October 14, 2026 18:23
@benbrandt
benbrandt added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit 0943bcb Oct 14, 2026
39 checks passed
@benbrandt
benbrandt deleted the benbrandt/acp-shared-client-runtime branch October 14, 2026 18:58
amirkhakshour pushed a commit to SourceShift/zed-mini-ork that referenced this pull request Oct 18, 2026
…ndustries#65601)

- Use one internal `ClientRuntime` for foreground queue/context dispatch
and SDK I/O ownership. Keep typed v1/v2 builders, initialization,
capabilities, auth requests and session semantics in their adapters; no
generic protocol-version framework.
- Share handle publication, cooperative owner shutdown and the
idempotent cleanup awaited by both SDK close callbacks and
transport-error paths.
- Share startup-versus-process-exit races, the existing 250 ms
error/exit preference, stdout/foreground/stderr exit draining and
process watching. Adapters still decide how to publish their exit
errors; v1 wait failures are now logged rather than held in an
unobserved task result.
- Reuse the child guard for both protocols, including failed or
abandoned v1 startup. Give real v1 connections the same cooperative
cleanup as v2 instead of immediately cancelling I/O/dispatch tasks when
their owner drops. Existing raw test drivers retain their cancel-on-drop
ownership.

Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants