Skip to content

Await ACP session opening under host ownership - #28047

Closed
brennanb2025 wants to merge 102 commits into
mainfrom
brennanb2025/agent-start-split-3-acp-start
Closed

brennanb2025 wants to merge 102 commits into
mainfrom
brennanb2025/agent-start-split-3-acp-start

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​557 $\color{#cf222e}{\Huge{\mathbf{−}}}$​195 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​362
Prod 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​925 $\color{#cf222e}{\Huge{\mathbf{−}}}$​404 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​521

ELI5

A chat using Grok or another Agent Client Protocol (ACP) agent could stay busy while initialization, sign-in or session restoration held the request that started it. Stop, close and failure then relied on a separate adapter path.

What Changed

The host now publishes the ACP process and awaits its open before sending input. Initialization, authentication, session restore with a fresh-session fallback, and configuration keep their existing order. Sign-in refusal shows the agent's words; other errors keep their diagnostic. Ready fields are installed only after the final live check. A catalog-save failure is logged through the existing helper and cannot fail the options read. The new running-work and process-liveness checks keep an active ACP turn from being evicted as idle and supply first-hand process evidence.

Why

One host-owned opening replaces the separate adapter startup path. Stop remains a session boundary because ACP protocol replies cannot reliably separate late work from a stopped turn; the next send opens a fresh session. Startup errors use the existing sign-in mapping and retain other diagnostics.

Differences from the common pattern

  • INTENDED — ACP is published before its handshake completes. A single host-owned process and open lifecycle serves every agent program. Early publication is retained for this common ownership path, rather than claimed as a new safety requirement.
  • INTENDED — Configuration updates reach the host. ACP reports live configuration and model-list facts to the execution host, which owns their publication; reports do not replace saved picks.

Linked Issue

Replaces the ACP-startup portion of #26561; depends on #28046 and #27925.

Visual Proof

Rendered before/after evidence is pending. Scripted tests cover the behavior; no screenshot or manual platform evidence is claimed.

Testing

  • Manually tested on all supported platforms
  • Automated tests added or updated

Focused ACP opening, authentication, close and late-reply tests; Node and CI project typechecks; static checks with the accepted pinned-main HtmlDocPreview exception. Scripted macOS tests only; no rendered or remote-host QA.

Review

Reviewed the owning diff, failure paths and covered races. Tests demonstrate covered behaviors; rendered and real remote-host QA are pending.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source is copied or translated.

Notes

Execution stays on the host owning the agent. Folder workspaces and independently updated peers retain their existing paths. Loss of contact is not process-exit evidence. Draft only; no main sync or hosted CI watch.

Checklist

  • Problem, user-facing change, mechanism and approach explained
  • Self-reviewed source and regression evidence
  • Cross-platform, folder, SSH and older-peer behavior considered
  • Final main sync, hosted CI and rendered proof completed

@brennanb2025
brennanb2025 force-pushed the brennanb2025/agent-start-split-2-codex-start branch from 7be6240 to 1232065 Compare October 12, 2026 21:31
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agent-start-split-3-acp-start branch from 8454fe1 to 699a59a Compare October 12, 2026 21:31
# Conflicts:
#	src/main/native-chat/agent-session-wire/structured-agent-session-attach-flow.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-attach-orchestration.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-host-mutations.ts
#	src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts
#	src/main/runtime/structured-agent-session-runtime.ts
#	src/renderer/src/components/native-chat/use-structured-agent-session-option-state.ts
# Conflicts:
#	src/main/acp/acp-structured-host-option-hang.test.ts
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/agent-start-split-2-codex-start to main October 17, 2026 00:51
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Folded into #28046, which merged as 5319125. Closing this draft; nothing here is lost.

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