# Claude ACP takeover verification

Original: [#19770](https://github.com/pingdotgg/t3code/pull/19770), @StiensWout. Replacement stack: [#21614](https://github.com/pingdotgg/t3code/pull/21614), [#21615](https://github.com/pingdotgg/t3code/pull/21615), [#21616](https://github.com/pingdotgg/t3code/pull/21616), [#21617](https://github.com/pingdotgg/t3code/pull/21617), [#21618](https://github.com/pingdotgg/t3code/pull/21618).

Implementation verified: [49928218bd](https://github.com/pingdotgg/t3code/commit/49928218bdc8799b50c9c8ff0a44bb6669b6501a), cumulative from [1451e7c](https://github.com/pingdotgg/t3code/commit/1451e7cb23034d29774338608368a15d8845df36). Headless Linux, official authenticated claude-agent-acp 0.93.0. All state and workspace changes were isolated from the live install.

## Actual baseline and current adapter

The same background-child prompt through the baseline production registry adapter completed its foreground at 20.956 seconds, after the child work. Through the replacement adapter, current-head foreground completion was 5.290 seconds with pending background work true; the child completed at 19.285 seconds; autonomous continuation completed at 21.058 seconds with pending work false. The provider was instructed to run one background child, sleep 12 seconds, return CHILD_DONE, and reply PARENT_REPLY immediately.

A separate current-head active foreground Stop requested session-wide close at 2.736 seconds. The terminal was interrupted at 2.754 seconds, and close returned at 2.763 seconds with pending work false. This exercises the official cancelled-idle-before-close-ACK behavior. It does not exercise forced timeout/refusal live.

## Integrated current-head web flow

A fresh thread sent the same prompt with a 30-second child sleep. Browser recording starts before submission. The parent reply is complete while the child card remains Running and the composer identifies the subagent it is waiting for. Child completion starts the provider continuation automatically; the final reply appears and Waiting/Stop clear.

Read-only assertions against the disposable app database confirm one createdBy=user prompt, one completed child with result CHILD_DONE, both root runs completed, and no pending/running/waiting root turn items. The agent-created continuation notification uses role=user and is presented as Background activity updated, not as a duplicate user prompt. No injected instruction prompt or duplicate generic Agent row appears.

Parent reply while the child runs:

![Completed parent reply while the child remains running](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/737ab5a70b79fe00/reply-while-child-runs.png)

After child completion and autonomous continuation:

![Completed continuation with Waiting and Stop cleared](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/a573a4f9370f2dfe/completed-continuation.png)

[Submission-through-completion recording](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b104d6b7c0810ac6/claude-background-lifecycle.mp4)

No baseline UI was reconstructed: the before/after comparison is the actual baseline/head adapter timing; images show the current head during background work and after completion. Chromium and recording worked on this machine.

A separate integrated web Stop check during a foreground sleep showed Run interrupted. Read-only database assertions confirm run status interrupted and an Interrupted result item paired with Interrupt requested. The fresh prompt was stopped while foreground sleep was running.

![Active foreground Stop shows Run interrupted](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1a6dbb205faad287/active-stop-interrupted.png)

## Focused verification

132/132 ACP behavior tests pass on this head, with affected provider/server typechecks and scoped lint/format checks. The preceding full focused run passed 249/249 tests across five existing files. Eleven focused new regression cases in three existing files replace 18 direct cases plus 22 scenario replays and their fixture matrix.

The stdio tests prove background permission/question completion, requests arriving during refused close remaining answerable, confirmed-close detached request cancellation, root idle/child result arriving during a refused close, nested/sibling ownership, early and reopened child results, usage/metadata and terminal tool identity, and transport failure. The refusal regression is RED before the fix and GREEN after it. Timeout retains activity through the same no-tentative-quarantine path; there is no newly added separate timeout case or live timeout claim.

## Limits

macOS, Windows, iOS, Android, Electron desktop, relay/tunnel connections and live account-specific permission/refusal/timeout flows were not verified. No client, wire or database schema changes. Shared ownership also applies to SDK resumes; shared ACP child-tool and terminal identity changes reach other ACP flavors. Per-child Stop remains unsupported as before.

Independent full-diff round 8 Opus and Sol reviews both have no confirmed findings on this exact head. Opus also independently reran the strengthened Stop replay successfully. Current-head CI is blocked after one failed-job rerun per updated workflow: the remaining unchanged browser-test failures are WorkflowOpeningBlock highlighting on layer 3, AttachmentFilePreview renewed source recovery on layer 4, and RightPanelTabs keyboard focus on layer 5. Each web run reports 8047 passing tests and one failure. The latter two changed from highlighting failures on their initial attempts, consistent with CI flakiness rather than this adapter change. All other code checks pass; the aggregate Check fails because Test Web fails. Latest failed jobs: [layer 3](https://github.com/pingdotgg/t3code/actions/runs/39244536130/job/118040760424), [layer 4](https://github.com/pingdotgg/t3code/actions/runs/39244536532/job/118040769892), [layer 5](https://github.com/pingdotgg/t3code/actions/runs/39244541991/job/118040781939). No web source or web tests changed in this stack. This remaining CI failure must be resolved before merging; it is not waived. Neutral human-review gates remain unmet. Earlier rounds found Stop could report cancelled after insertion or failed before insertion. The strengthened existing replay covers both orderings, including holding close ACK until a typed -32800 pre-insertion prompt cancellation publishes its interrupted terminal with null failure. It failed before each fix and passes now; no new cases were added. The turn-scoped pending Stop marker survives through confirmed cleanup; other prompt errors remain failures. Pre-insertion cancellation is verified deterministically, not claimed as live account reproduction. CodeRabbit paused automated reviews after its included review quota; its last covered revisions do not cover every current layer head. The independent full-diff Opus/Sol reviews cover the exact cumulative head. Human review is required for the default/ownership change and to clear the remaining review gates. These PRs are unmerged.

Tests: GPT-6 Astra / Codex. Implementation: GPT-6.1 Sol / Codex. Reviews: Claude Opus 5.5 / Claude Code and GPT-6 Sol / Codex.
