# Read-only proof audit pass 1

Issue: [#24297](https://git.cafe/pingdotgg/t3code/issues/24297)
Range: [27e0c684c5](https://git.cafe/pingdotgg/t3code/commit/27e0c684c5) to [e362ada9c1](https://git.cafe/pingdotgg/t3code/commit/e362ada9c1)

VERDICT: PROOF INCOMPLETE — empty UI fixture matrix is applicable; after-runtime proof is required before a proof PASS.

## Fixture matrix

[]

The complete diff is two server files, 84 insertions: ClaudeAdapterV2.ts (11 lines) and ClaudeAdapterV2.test.ts (73 lines). No rendering code, client code, UI state mapping, styles, assets, or contracts change. There are zero visual fixtures and no screenshot/video requirement for this server-only fix. User-observable automatic delivery still requires a runtime transcript. An empty visual matrix does not waive runtime evidence.

## Evidence checked

Read issue and its complete comment listing with cafe only. Comment listing returned zero items, next=null, truncated=false. Issue describes original async delegated task finalizing during the background-exit/wake-registration gap, with the stale result delivered and subsequent child results orphaned.

[Before-runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/763a360a2b657e29/before-runtime.txt): attempt 1 (background sleep45, reviewers sleep70/sleep90) succeeds; attempt 2 (background sleep45, reviewers sleep2/sleep3) reproduces stale completion. Parent receives an automatic completed notification containing STILL_BACKGROUND while child wake run 4 later returns FINAL_VARIANT_24297. The successful first attempt alone would be inadequate: outstanding reviewers can mask the gap.

[Red test](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/beb16c710da56738/red-test.txt): the newly added named test fails with pre-wake published rosters [[task],[task],[]] versus [[task],[task],[task]]. This is the intended invariant, not an unrelated failure. The log does not independently record its exact source revision or invocation; its baseline attribution comes from the supplied context. No green test evidence was supplied or independently executed during this read-only audit.

The adapter first buffers idle task_notification while its wake eligibility is still tracked, then removes the internal pending item. The fix suppresses publishing that removal only when the same notification is held in the wake buffer with no active context. The projection therefore retains the blocking roster during the gap. Wake attachment emits provider_turn.updated before replay; finalizeActiveTurn publishes the actual current roster before terminal output. The new test covers published roster ordering and eventual clearing with synthetic SDK frames. It does not exercise a real Claude process, persisted delegated task finalization, automatic parent delivery, or nested delegated reviewer timing.

## Minimal after-runtime proof sequence (for the implementing agent; not executed here)

1. Use an isolated server running the exact fixed revision, with real Claude Agent claude-opus-5-5 and the same runtime configuration as the before transcript. Record revision, provider/model, parent thread ID, original task ID, child thread ID, and nested reviewer task IDs. Do not use the live userdata database.
2. Parent starts one NEW original async delegate_task Claude child. Child starts Bash sleep45 with run_in_background=true and two async delegated reviewers running foreground sleep2 and sleep3, returning REVIEW_A and REVIEW_B. Child ends initial turn immediately with INTERIM_VARIANT_24297. On reviewer wakes it returns STILL_BACKGROUND; on background exit it returns FINAL_VARIANT_24297. Neither parent nor child polls, waits inside the initial turn, or sends manual follow-ups to repair delivery. Parent ends with WAIT_VARIANT and accepts the natural automatic notification.
3. Verify that both reviewers and their resulting child turns actually finish before the background-exit wake begins. If provider latency reverses that order, the run did not exercise the previously failing gap; repeat with timings that establish the required order and report the actual times.
4. Read isolated persisted records/transcript after natural completion. Correlate child run start/end times and assistant results, reviewer completion times, original task status/result/completedAt, parent automatic notification, and provider pending roster. Capture relevant persisted events if available to demonstrate retained roster before wake registration and clearing afterward. No screenshots are needed.

Exact required result: the original delegated task has no terminal completion or parent result notification carrying INTERIM_VARIANT_24297 or STILL_BACKGROUND. It remains unfinalized through the background-exit/wake-registration gap and until the wake run returning FINAL_VARIANT_24297 has finished. Its eventual completed result is exactly FINAL_VARIANT_24297, and the parent automatically receives exactly one completion notification for that original task containing FINAL_VARIANT_24297, without polling/manual recovery. Pending background roster is eventually empty, so retention does not strand the task. A late FINAL_VARIANT_24297 visible only in task_status/latestTerminalSummary is a failure, not proof of delivery.

A green focused regression test should accompany this transcript, but cannot replace it. Optional broader confidence: rerun the already successful long-reviewer ordering to confirm finalization still waits for the final reviewer-triggered turn. It does not replace the short-reviewer failing ordering above.

## Applicability across surfaces

Web, desktop, mobile, local/remote/tunnel, MCP and scheduled callers share this server adapter behavior; no changed render path or separate visual fixture exists. Claude is the affected provider; no other provider adapter changes. The original MCP delegate_task automatic parent result is the critical entry point. No new feature/reverse action or documentation change is introduced.

## Friction and scope

FRICTION: No operational blocker. cafe returned JSON under the installed automatic output policy; issue and comments were readable. Supplied before-runtime and red-test artifacts were readable. Missing after-runtime evidence is the outstanding proof gap, not a tooling failure.

No repository edits, pushes, forge comments, browser use, captures, dev servers, tests, or subagents were performed. Only this report was written under /tmp for the requested upload. No PR was supplied or audited.
