# R17 — Expired stop still executes

Environment: fs-50; Linux 6.8.0-117-generic x86_64; Node v26.12.1; Playwright 1.60.0; Chrome Headless Shell 157.0.8103.38; isolated dev:server, T3CODE_DEV_SEED=0, fresh per-checkout SQLite; synthetic Fx fixture; RPC/MCP over loopback; UTC timestamps.

Scripted interaction (same inputs on both revisions; generated ids differ): Record A; hold appearance; queue public recordingStop 300ms later, before appearance is overdue. Hold until at least stop-start+122000ms, then release; observe stop/encoder milestones and retry stop.

What differed: Head answers the stop timeout at about 120500ms yet still actually stops capture after release. Before the appearance timeout disconnects the stop earlier, but the queued stop also eventually runs. Retry reports no active recording.

## C4 steps and timestamps

Before step times (UTC):

```jsonl
{"time":"2026-11-10T11:36:44.000Z","tool":"preview_open","caller":0,"args":{"reuseExistingTab":false,"open":false}}
{"time":"2026-11-10T11:36:44.166Z","tool":"preview_recording_start","caller":0,"args":{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480"}}
{"time":"2026-11-10T11:36:44.782Z","tool":"preview_set_appearance","caller":0,"args":{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","colorScheme":"dark"}}
{"time":"2026-11-10T11:36:45.084Z","tool":"preview_recording_stop","caller":0,"args":{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480"}}
{"time":"2026-11-10T11:38:49.087Z","tool":"preview_recording_stop","caller":0,"args":{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480"}}
{"time":"2026-11-10T11:38:49.103Z","tool":"preview_evaluate","caller":0,"args":{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","expression":"document.body.dataset.probe=\"ok\"; \"ok\""}}
{"time":"2026-11-10T11:38:49.115Z","tool":"t3_preview_close","caller":0,"args":{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480"}}
```

After step times (UTC):

```jsonl
{"time":"2026-11-10T11:34:35.239Z","tool":"preview_open","caller":0,"args":{"reuseExistingTab":false,"open":false}}
{"time":"2026-11-10T11:34:35.308Z","tool":"preview_recording_start","caller":0,"args":{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406"}}
{"time":"2026-11-10T11:34:35.955Z","tool":"preview_set_appearance","caller":0,"args":{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","colorScheme":"dark"}}
{"time":"2026-11-10T11:34:36.257Z","tool":"preview_recording_stop","caller":0,"args":{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406"}}
{"time":"2026-11-10T11:36:40.259Z","tool":"preview_recording_stop","caller":0,"args":{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406"}}
{"time":"2026-11-10T11:36:40.272Z","tool":"preview_evaluate","caller":0,"args":{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","expression":"document.body.dataset.probe=\"ok\"; \"ok\""}}
{"time":"2026-11-10T11:36:40.285Z","tool":"t3_preview_close","caller":0,"args":{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406"}}
```

<a id="before"></a>
## Before — C4

SHA: [fa2f4ff2a2](https://github.com/pingdotgg/t3code/commit/fa2f4ff2a2bac5ac92e07749f6b83b0003d642a0)

Agent-visible results (status/list fields selected; error text verbatim):

```jsonl
{"time":"2026-11-10T11:36:44.166Z","tool":"preview_open","caller":0,"result":{"isError":false,"selectedStatusFields":{"available":true,"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","url":null,"loading":false,"control":{"owner":"agent","ownedByCaller":true,"generation":0},"dialog":null,"viewportSetting":{"_tag":"fill"},"viewport":{"width":1280,"height":800},"tabs":[{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","owner":"agent","ownedByCaller":true}]}}}
{"time":"2026-11-10T11:36:44.782Z","tool":"preview_recording_start","caller":0,"result":{"isError":false,"structuredContent":{"tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","recording":true,"startedAt":"2026-11-10T11:36:44.768Z"}}}
{"time":"2026-11-10T11:37:00.813Z","tool":"preview_set_appearance","caller":0,"result":{"content":[{"type":"text","text":"Preview automation setColorScheme timed out after 15000ms."}],"isError":true}}
{"time":"2026-11-10T11:37:00.808Z","tool":"preview_recording_stop","caller":0,"result":{"content":[{"type":"text","text":"Preview automation client server-browser disconnected during recordingStop."}],"isError":true}}
{"time":"2026-11-10T11:38:49.102Z","tool":"preview_recording_stop","caller":0,"result":{"content":[{"type":"text","text":"Preview automation recordingStop failed: No recording is active for this thread."}],"isError":true}}
{"time":"2026-11-10T11:38:49.115Z","tool":"preview_evaluate","caller":0,"result":{"isError":false,"structuredContent":{"value":"ok"}}}
{"time":"2026-11-10T11:38:49.122Z","tool":"t3_preview_close","caller":0,"result":{"isError":false,"structuredContent":{}}}
```

Relevant server milestones:

```jsonl
{"time":"2026-11-10T11:36:17.480Z","event":"host.connected","connectionId":"a2081acc-a298-4cfd-9325-25a29388bdc3"}
{"time":"2026-11-10T11:36:44.030Z","event":"request.start","operation":"open","requestId":"preview-112","tabId":"tab_b_bea12b60-c14f-4580-bb58-2b38123bd480","timeoutMs":660000,"connectionId":"a2081acc-a298-4cfd-9325-25a29388bdc3"}
{"time":"2026-11-10T11:36:44.125Z","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","event":"tab.created","detail":{"desktop":false,"isolatedContext":true}}
{"time":"2026-11-10T11:36:44.184Z","event":"request.start","operation":"recordingStart","requestId":"preview-113","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","timeoutMs":15000,"connectionId":"a2081acc-a298-4cfd-9325-25a29388bdc3"}
{"time":"2026-11-10T11:36:44.799Z","event":"request.start","operation":"setColorScheme","requestId":"preview-115","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","timeoutMs":15000,"connectionId":"a2081acc-a298-4cfd-9325-25a29388bdc3"}
{"time":"2026-11-10T11:36:44.805Z","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","event":"emulateMedia.start","detail":[{"colorScheme":"dark"}]}
{"time":"2026-11-10T11:36:44.806Z","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","event":"emulateMedia.held","detail":{}}
{"time":"2026-11-10T11:36:45.098Z","event":"request.start","operation":"recordingStop","requestId":"preview-116","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","timeoutMs":120000,"connectionId":"a2081acc-a298-4cfd-9325-25a29388bdc3"}
{"time":"2026-11-10T11:37:01.802Z","event":"host.connected","connectionId":"df66ae07-3409-4a36-adf5-acca7ed48f60"}
{"time":"2026-11-10T11:38:47.093Z","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","event":"emulateMedia.end","detail":{}}
{"time":"2026-11-10T11:38:47.094Z","event":"recording.stop.start","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480"}
{"time":"2026-11-10T11:38:47.140Z","event":"recording.encoder.closed","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480"}
{"time":"2026-11-10T11:38:49.098Z","event":"request.start","operation":"recordingStop","requestId":"preview-117","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","timeoutMs":120000,"connectionId":"df66ae07-3409-4a36-adf5-acca7ed48f60"}
{"time":"2026-11-10T11:38:49.110Z","event":"request.start","operation":"evaluate","requestId":"preview-118","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","timeoutMs":15000,"connectionId":"df66ae07-3409-4a36-adf5-acca7ed48f60"}
{"time":"2026-11-10T11:38:49.120Z","event":"request.start","operation":"close","requestId":"preview-120","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","timeoutMs":15000,"connectionId":"df66ae07-3409-4a36-adf5-acca7ed48f60"}
{"time":"2026-11-10T11:38:49.120Z","event":"dropTab","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","recording":false}
{"time":"2026-11-10T11:38:49.120Z","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","event":"close.start","detail":[]}
{"time":"2026-11-10T11:38:49.120Z","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","event":"context.close.start","detail":{}}
{"time":"2026-11-10T11:38:49.121Z","event":"dropTab","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","recording":false}
{"time":"2026-11-10T11:38:49.122Z","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","event":"page.closed","detail":{}}
{"time":"2026-11-10T11:38:49.122Z","event":"dropTab","tabId":"tab_c_bea12b60-c14f-4580-bb58-2b38123bd480","recording":false}
```

<a id="after"></a>
## After — C4

SHA: [b088b88d19](https://github.com/pingdotgg/t3code/commit/b088b88d19fb0edc43f754da2e1d199bda70d6d8)

Agent-visible results (status/list fields selected; error text verbatim):

```jsonl
{"time":"2026-11-10T11:34:35.308Z","tool":"preview_open","caller":0,"result":{"isError":false,"selectedStatusFields":{"available":true,"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","url":null,"loading":false,"control":{"owner":"agent","ownedByCaller":true,"generation":0},"dialog":null,"viewportSetting":{"_tag":"fill"},"viewport":{"width":1280,"height":800},"tabs":[{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","owner":"agent","ownedByCaller":true}]}}}
{"time":"2026-11-10T11:34:35.954Z","tool":"preview_recording_start","caller":0,"result":{"isError":false,"structuredContent":{"tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","recording":true,"startedAt":"2026-11-10T11:34:35.939Z"}}}
{"time":"2026-11-10T11:34:51.473Z","tool":"preview_set_appearance","caller":0,"result":{"content":[{"type":"text","text":"Preview automation setColorScheme timed out after 15000ms."}],"isError":true}}
{"time":"2026-11-10T11:36:36.780Z","tool":"preview_recording_stop","caller":0,"result":{"content":[{"type":"text","text":"Preview automation recordingStop timed out after 120000ms."}],"isError":true}}
{"time":"2026-11-10T11:36:40.272Z","tool":"preview_recording_stop","caller":0,"result":{"content":[{"type":"text","text":"Preview automation recordingStop failed: No recording is active for this thread."}],"isError":true}}
{"time":"2026-11-10T11:36:40.285Z","tool":"preview_evaluate","caller":0,"result":{"isError":false,"structuredContent":{"value":"ok"}}}
{"time":"2026-11-10T11:36:40.296Z","tool":"t3_preview_close","caller":0,"result":{"isError":false,"structuredContent":{}}}
```

Relevant server milestones:

```jsonl
{"time":"2026-11-10T11:29:29.949Z","event":"host.connected","connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:34:35.250Z","event":"request.start","operation":"open","requestId":"preview-96","tabId":"tab_a_bd9d2d9d-727d-4676-b1e8-9554a31f1406","timeoutMs":660000,"connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:34:35.295Z","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","event":"tab.created","detail":{"desktop":false,"isolatedContext":true}}
{"time":"2026-11-10T11:34:35.318Z","event":"request.start","operation":"recordingStart","requestId":"preview-97","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","timeoutMs":15000,"connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:34:35.967Z","event":"request.start","operation":"setColorScheme","requestId":"preview-99","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","timeoutMs":15000,"connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:34:35.968Z","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","event":"emulateMedia.start","detail":[{"colorScheme":"dark"}]}
{"time":"2026-11-10T11:34:35.968Z","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","event":"emulateMedia.held","detail":{}}
{"time":"2026-11-10T11:34:36.273Z","event":"request.start","operation":"recordingStop","requestId":"preview-100","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","timeoutMs":120000,"connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:36:38.270Z","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","event":"emulateMedia.end","detail":{}}
{"time":"2026-11-10T11:36:38.270Z","event":"recording.stop.start","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406"}
{"time":"2026-11-10T11:36:38.323Z","event":"recording.encoder.closed","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406"}
{"time":"2026-11-10T11:36:40.268Z","event":"request.start","operation":"recordingStop","requestId":"preview-101","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","timeoutMs":120000,"connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:36:40.280Z","event":"request.start","operation":"evaluate","requestId":"preview-102","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","timeoutMs":15000,"connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:36:40.291Z","event":"request.start","operation":"close","requestId":"preview-104","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","timeoutMs":15000,"connectionId":"09b81d2d-300e-436a-8035-a1f18530f0d1"}
{"time":"2026-11-10T11:36:40.292Z","event":"dropTab","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","recording":false}
{"time":"2026-11-10T11:36:40.292Z","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","event":"close.start","detail":[]}
{"time":"2026-11-10T11:36:40.292Z","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","event":"context.close.start","detail":{}}
{"time":"2026-11-10T11:36:40.293Z","event":"dropTab","tabId":"tab_b_bd9d2d9d-727d-4676-b1e8-9554a31f1406","recording":false}
```

AI-assisted; verified with the tests and tools listed above.
