# Runtime and regression proof index — issue 23151

Issue [#23151](https://github.com/pingdotgg/t3code/issues/23151), origin mirror [#23155](https://git.cafe/pingdotgg/t3code/issues/23155). Requested branch `fix/issue-23151`, source checkout `/home/ubuntu/wt/issue-23151`.

Scope: base [b5a226e49c](https://git.cafe/pingdotgg/t3code/commit/b5a226e49c52ecab4ddc2d678a7012d97e651a6a) → requested head [7b6753972c](https://git.cafe/pingdotgg/t3code/commit/7b6753972c700b3e4145716a88f134889a696f08). Render matrix **EMPTY, 0/0 rows**: [pass1 matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/9d3928580a741713/issue-23151-pass1-proof-matrix.md). The complete requested diff changes only the server registration deadline and one regression test. No pixel diff, UI rows, or data seeding script is required. This index assembles actual pre-existing runtime artifacts plus two focused test executions; it does not claim every requested control has been captured on both revisions.

The lead checkout advanced externally to [13b099304a](https://git.cafe/pingdotgg/t3code/commit/13b099304a955c5bcce782ebd818d31ed3d1dac1) at 00:42:33 UTC, after the head test completed. This index certifies evidence for the requested head only; it is not a diff audit or runtime certification of that later merge. No source changes, commits, pushes, forge comments, servers, browsers, simulators, typechecks, installs, or broad tests were performed by this evidence-capture worker. A temporary detached red worktree was created outside the lead checkout and reused existing dependency directories.

## Regression red/green

Actual red revision: [8528e5a93d](https://git.cafe/pingdotgg/t3code/commit/8528e5a93d3bd36b66fec19c52cd280951ed0677), whose parent is [b5a226e49c](https://git.cafe/pingdotgg/t3code/commit/b5a226e49c52ecab4ddc2d678a7012d97e651a6a). This is **base production code plus the head regression test**, not pristine base. The test file is identical at red and requested head. Exact overlay: [red-test-overlay.diff](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/397250ed740d3560/red-test-overlay.diff).

Exact command, run from each checkout's `apps/server`:

```sh
../../node_modules/.bin/vp test run src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts
```

- Red, `/tmp/issue23151-red-proof`, 2026-10-22 00:41:13 UTC: exit **1**, 1 failed / 2 passed, 4.10 seconds. `opens a session whose SessionStart hook outlasts 90 seconds` fails with `AssertionError: open failed: Failure(Cause([Fail(ClaudeAgentSdkQueryRunnerError: Claude Agent SDK query failed. (cause: "Claude Code did not answer the MCP server registration."))])): expected false to be true`. [red-tests.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c1fc3ce03a31a2f9/red-tests.log)
- Green, requested head, 2026-10-22 00:40:38 UTC: exit **0**, **3/3 passed**, 8.72 seconds. The unchanged regression holds the mocked registration response until 105 seconds of virtual time, then asserts successful open and zero calls to close. It does not execute a real hook; the real-hook evidence is below. [head-tests.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/984e2deec1acc3f2/head-tests.log)
- Source SHA observations, clean status, full revision chronology, command, exit statuses, dependency/version notes: [capture-metadata.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7bdf26115c34bd38/capture-metadata.txt). Both checkouts were clean when inspected. The lead checkout was not checked out or edited for red.

## Real cold-hook runtime

Primary transcript: [query-runner-spans.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e50bcccd45cc8fdf/query-runner-spans.json); correlated real-provider protocol/results: [provider-results.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/8936f3d40e35b342/provider-results.json); filesystem hook markers: [issue23151-hooks.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/50b2f3de40af69f2/issue23151-hooks.log).

Environment reported by lead: real Chromium headless T3 collaborative preview, 1280×800, Linux x64, isolated empty dev state. Provider protocol independently records Claude CLI **2.1.303**, model `claude-opus-5-5`, dynamic `t3-code` MCP connection, deterministic reply `ok`. Installed SDK at capture: **0.3.276**, Node **v24.21.0**. The live-data snapshot migration failed during original setup; this is not full-state coverage.

Fixture checkout `/tmp/issue23151-fixture`, before linked worktree `/tmp/issue23151-cold`, after linked worktree `/tmp/issue23151-after` all report fixture commit `5c5c83e39c4bf22acb578212cdcf5c8aa1486bf0`. Settings: `SessionStart`, matcher `startup`, command `bash .claude/setup.sh`, timeout **600 seconds**. Script sleeps **105 seconds** only for a linked worktree without its git-dir warm marker, then creates that marker. The main fixture exits immediately. Exact sanitised fixture copies: [fixture-settings.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/eb077af7f133d640/fixture-settings.json), [fixture-setup.sh](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/aca3f7393fcc6055/fixture-setup.sh).

- **Before, base production, 90-second deadline:** query-open span `80328a15000b655e`, trace `1d8e1093dfdc2e09359ed1ef2188bf97`, starts **2026-10-21 23:25:06.381347 UTC** and fails **23:26:36.590139 UTC**, **90208.792423 ms**. Hook start **23:25:07 UTC**, `/tmp/issue23151-cold`; no matching completion marker for this app attempt. Error is `Claude Code did not answer the MCP server registration.` The failure was captured before the fix existed. Do not attribute the later **23:28:47** marker to this failed app attempt: it belongs to the separate standalone CLI cold run started at **23:27:02**. No termination timestamp was captured for the failed app hook.
- **After, requested head, 690-second deadline:** successful second attempt span `ffdf496776e1fe8f`, trace `18616ca0ef721ff2c08cb26fbf01e921`, starts **2026-10-22 00:07:42.484586 UTC**, succeeds **00:09:29.252273 UTC**, **106767.687536 ms**. Actual hook markers: **00:07:43 → 00:09:28 UTC**, `/tmp/issue23151-after`, a full 105 seconds. Thus open remained pending beyond the former 90-second cutoff. At **00:09:29.371 UTC**, provider init reports `t3-code` connected. Assistant `ok` is logged **00:09:31.020 UTC** and final `result` is `success`, `is_error: false`, `result: ok` at **00:09:31.109 UTC**. Thread `7569ef46-4af4-4083-967d-e1f5fc05dad1`, native session `9c6c72ed-bd52-4e24-a82d-73b669e9b5f1` bind cwd, registration, and result.
- **Excluded, inconclusive:** first after attempt starts **00:04:24.418913 UTC**, span `ca216dc7a8ddddb2`, is **Interrupted after 62273.880524 ms** during the lead's dev restart. Hook starts **00:04:25** with no finish marker. It is neither a timeout failure nor success proof. The successful second attempt independently ran the full delay; the first did not create the completion cache marker.

The SDK hook-start/hook-response events appear in the provider log after registration because protocol messages are delivered/logged after query open; use the filesystem markers for actual hook wall time. `query.open` likewise logs after registration. Original summary artifacts are retained, with these corrections and exclusions taking precedence: [runtime-before.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/ec51355cc500adc9/runtime-before.json), [runtime-after.json](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/288f985c59e1616a/runtime-after.json), [reproduction.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/aab2799e3d4dabf8/reproduction.txt). The `head` field in the original after JSON is a capture label, not a claim that every included span ran head code.

Revision binding: source paths in original failure stacks point to the lead checkout; base open definition is line 885 and interrupted head definition is line 887. Reflog places base failure before test/fix commits and the successful after run after the requested fix commit. Tests and source confirm 90/690-second configured deadlines. These artifacts corroborate the lead's runtime revision attribution, but no contemporaneous process-PID-to-full-SHA or binary digest attestation was captured. Full dev log is deliberately not uploaded because it contains tokens.

## Controls and limits

The following controls succeeded **before the production fix**. At 00:02 UTC the actual source revision was the test-only red commit, with production still identical to base.

- Main fixture new query: **822.472557 ms**, **23:27:20.697573 → 23:27:21.520045 UTC**. Immediate startup hook, MCP connected, `ok` result at **23:27:23.066 UTC**. Native session `3b2b508f-b4c1-4947-9709-7d4f0ca37fd4`.
- Main fixture follow-up: **1010.517873 ms**, **00:02:01.029695 → 00:02:02.040213 UTC**; `ok` result **00:02:03.908 UTC**, same native session, no new startup hook. **This is a resumed query**, not proof of live-query reuse: protocol has another `query.open` with `resume`, and the runner has a new open span. The earlier shorthand “follow-up” must not be expanded into a reuse claim.
- Warm linked-worktree new query: **824.755048 ms**, **00:02:32.435625 → 00:02:33.260380 UTC**; hook start/end **00:02:32**, MCP connected, `ok` result **00:02:35.042 UTC**. Cwd `/tmp/issue23151-cold`, new native session `0c80d94b-117c-43c9-8fcd-7fb7de6fa8dd`.
- Standalone CLI calibration, not T3 adapter proof: main `ok`, **12.667 s**; independently cold CLI `ok`, **122.711 s**. Exact command reported by lead: `time claude -p 'reply ok' --model claude-opus-5-5`. [issue23151-cli-main.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/71b3222ebec99ba8/issue23151-cli-main.log), [issue23151-cli-cold.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/9c259f9c95104af7/issue23151-cli-cold.log).

Not captured: comparable main/warm/follow-up controls on head; actual live-query reuse; the exact 690-second boundary or never-answering cleanup; a full ten-minute hook; arbitrary hook timeout settings; macOS desktop, Windows native, mobile, remote/relay/tunnel, other providers, or populated/full-state client coverage. Cross-surface applicability follows the shared server path, not separate native/client execution. The two independent MERGE reviews are lead-supplied context, not reviews performed by this worker.

## Supplemental illustrative recordings

These show the existing client during the runtime scenario, **not visual before/after proof**. Render rows remain 0/0. For elapsed-time/interaction demonstration, **recording required; stills insufficient**. No pixel comparison or claim that nothing else changed is made.

Before illustration: recording begins about 14 seconds into the 90-second wait; not full-start coverage. [cold-worktree-timeout.mp4](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/9a2a3fe6bbf3af9a/cold-worktree-timeout.mp4)

![cold-worktree-failed.png](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e35ef3fcba63021a/cold-worktree-failed.png)

After illustration: full capture supplied by lead starts **00:07:39.983 UTC**, with prompt entry/click, covers the hook wait and final response. Copied out of live attachments before upload. [cold-worktree-success.mp4](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f36bcd7dd7b996f4/cold-worktree-success.mp4)

![cold-worktree-success.png](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/999f72a8693e10cd/cold-worktree-success.png)

Main control illustration:

![main-checkout-success.png](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/d3cd1fcf3cbc98e8/main-checkout-success.png)

## Sanitisation and handoff

Only relevant runner spans and allowlisted provider fields are uploaded; long exception stacks are reduced to summaries/source locations. No auth headers, pairing tokens, MCP URLs, environments, hook output, unrelated prompts, full provider logs, full dev log, or live database are uploaded. Existing UI captures show only the isolated fixture flow. Exact `ghdrop upload -m` Markdown is preserved in the upload manifest and reused here.

Core old-cutoff regression: supported by red/green test and real cold-hook failure/success. Broader matrix control coverage remains limited as stated above. No new capture is requested of the lead in this handoff.

FRICTION

- revision | lead checkout merged externally after the focused run | associate proof with recorded requested SHA; do not certify later HEAD implicitly
- evidence | follow-up was resumed query, and head controls are absent | retain exact protocol semantics and state unverified coverage
- tooling | ffmpeg/ffprobe absent | inspected supplied clips through installed OpenCV; installed nothing
