PR [#17109](https://github.com/pingdotgg/t3code/pull/17109) — Claude buffered-wake takeover proof
Current focused-suite head: b39ea65bb0f4040d49d69a194997009f1ea99e3d
Earlier R3 proof head: 7ac31eebc8194251f0924e8748c155d7fa1ce328
Original contributor head: d06173bf6a2f633de64996e52c10f76ce29afc96
Base verified: 1451e7cb23034d29774338608368a15d8845df36

Deterministic SDK frames drive real Claude adapter, session manager, orchestration and SQLite services. This is server-level behavior proof, not an authenticated live Claude CLI/model claim.

Before: all four initial behavior regressions fail on main. Contributor implementation passes 314/fails 2 of 316: provider switching after eligibility and resumed outcome persistence remain broken.
After R4: 495/495 across nine focused suites. Five original PR cases became four behavior regressions; eight further cases cover distinct atomic admission, queued switch/cancel/planning failure, resumed transcript, subscription closure, command-output cleanup and transcript-order behavior. Existing main tests are preserved.

Ordering regression discovered in review round2: published R2 persisted the Agent card before its introduction. Added one integration case against real stored ordinals, red on R2:
AssertionError: the introduction precedes its Agent card: expected 1000003 to be below 1000002
After narrowing live turn-item tagging: 9/9 integration cases pass; the independent Sol review also reran and passed the new regression.

Current R4 focused suite output (implementation-r4-tests.log):
 Test Files  9 passed (9)
      Tests  495 passed (495)
   Duration  46.51s

Earlier R3 replay suites (not rerun in R4): 158/161 initially passed, with three timeouts under machine load. Exactly those three cases passed on unchanged-source targeted retry, 3/3. No assertion failures, timeout changes, sleeps or polling added. Do not interpret the initial combined replay run as completely green.

Four previous fixes were individually reverted to confirm their regressions fail: queued wake switch, session-owned command settlement/live-output cleanup, subscription closure/no duplicate ingest, newer resumed transcript retention.

Scoped server and provider-core typechecks, targeted lint and formatting pass. Existing warnings only. git diff --check passes.

Earlier R3 live smoke (no changed UI in R4): isolated Linux development server starts, collaborative browser pairs and chat composer loads. The live-data snapshot was rejected due to incompatible migration history; fresh isolated state was used. No developer live data was written.

Unverified: authenticated live Claude CLI provider-switch flow; macOS, Windows, Electron desktop, iOS, Android. No merge performed. No screenshot attached because no visual component changed.

R4 contains one confirmed current-head CodeRabbit regression. An ordinary session-owned artifact write failure previously became a fatal stream error, releasing the entire provider session and stopping unrelated background work. A fresh Astra test extends the existing settlement/live-output case with a one-shot EventSinkWriteError, then a status event and later artifact through the real normalizer, ingestor, session manager, SQLite and event store. Against R3: 68 pass, one direct assertion failure (no timeout). After R4: 69/69 manager cases pass, and all nine focused suites pass 495/495.

Three new parameterized controls cover distinct fatal boundaries: untagged runless request persistence failure, tagged request-node persistence failure, and a true defect on a tagged non-request node. Each still fails its subscriber, persists an error release and closes the provider scope once. The ordinary artifact case instead keeps the same runtime and subscriber alive, persists the later artifact and releases command-output slots. No sleeps, polling or timeout-based synchronization were added.

The implementation catches only typed ProviderEventPublishError directly at ingestion, for explicitly session-owned non-request artifacts. A shared semantic request predicate keeps request rows/nodes/approval and input cards fatal even when tagged and carrying run IDs. Normalize errors, defects, interruption and shutdown retain their existing paths. The failed artifact may remain stale; there is no retry or durable-recovery claim. Typecheck has zero errors, targeted lint/format and diff checks pass. Fresh R4 whole-PR Opus/Sol reviews and new-head CI are recorded in the PR body.

The R4 failure path is verified by actual in-process server/SQLite fault injection, not by a live authenticated Claude session or browser database-failure injection. Previous browser and replay evidence remains explicitly historical. No platform or remote-connection execution claim is added.
