# Sanitized after-runtime evidence

Issue [#15567](https://github.com/pingdotgg/t3code/issues/15567); PR [#22837](https://git.cafe/pingdotgg/t3code/pulls/22837) ([GitHub mirror #22837](https://github.com/pingdotgg/t3code/pull/22837)).

Final HEAD [24460f2b4b](https://github.com/pingdotgg/t3code/commit/24460f2b4b4cb7dbcaef8f0aea5de6b5586b94ed). Supplied merge base/current main [2c8bdf6177](https://github.com/pingdotgg/t3code/commit/2c8bdf6177); original repro [22840ab943](https://github.com/pingdotgg/t3code/commit/22840ab943).

Environment: Linux; worktree `/home/ubuntu/wt/issue-15567`; isolated worktree `.t3/userdata/statev2.sqlite`; Codex 0.163, gpt-6-astra, medium effort (runtime setup reported by primary). Primary ran `vp run dev` and browser interaction, restarted the server before each final probe. This evidence step ran no server, browser, tests, or forge mutations. No rendering changes; visual fixture matrix `[]` per proofaudit1.

Controlled runtime procedure: root native `followup_task` resumed existing B `/root/restart_probe` for `PROBE_FINAL_RESTART`, waiting for completion. After another server restart, root resumed the same B, B resumed its existing C `/root/restart_probe/nested_probe`, C ran `sleep 10` and returned `NESTED_FINAL_RESTART`; B waited and returned the same marker. Root returned `FINAL_DISPATCHED_NO_WAIT` immediately after dispatch, without waiting.

Read commands: `git status --short`, `git rev-parse HEAD`, `git remote get-url origin`; Python `sqlite3.connect('file:/home/ubuntu/wt/issue-15567/.t3/userdata/statev2.sqlite?mode=ro', uri=True)` and `SELECT payload_json FROM orchestration_v2_projection_{subagents,provider_turns,messages}`. Read `/tmp/issue-15567/nested-final-running.json` and parsed `[time] NTIVE:` JSON `event.payload` from `.t3/userdata/logs/provider/events.*.log`. Output is an explicit field allowlist restricted to the controlled identities and exact final markers. No full provider log, credentials, or customer text is included. Extraction script: `/tmp/issue-15567/build-runtime.py`; command: `python3 /tmp/issue-15567/build-runtime.py`.

Result: runtime rows **3/3**.

- Same child after restart: B original task remains a singleton, native final marker persisted, resumed provider turn ordinal 5 completed; subsequent resume advances to 6.
- Activity after root terminal: root terminal at 21:24:40.264Z, C final at 21:24:57.157Z, B final at 21:24:59.683Z; both persisted after root ended.
- Nested identity/lineage: original B and C IDs each occur once; C advances ordinal 1 → 2; C task `parentNodeId` equals B resumed turn `nodeId` (asserted).

Scope limit: latest zero-saved-turns recovery is covered by deterministic regression tests, not this native runtime. Primary reported 225 focused tests passing across 5 suites; this evidence step did not rerun or independently verify those tests. Server restart timing is primary-reported; native event and persisted-state timings below are directly read.

The V2 event table is empty in this environment; persisted state is demonstrated by projections and the primary's saved running snapshot, not an event-table history.

## Native events (UTC log receipt times; provider start/end epoch seconds retained)

```json
[
  {
    "time": "2026-10-22T21:23:40.402Z",
    "who": "root",
    "method": "turn/started",
    "id": "01a1657f-8cda-7fc0-9642-45ee19da74e7",
    "rootTurnId": "01a1657f-8cda-7fc0-9642-45ee19da74e7",
    "status": "inProgress",
    "startedAt": 1792704220,
    "completedAt": null
  },
  {
    "time": "2026-10-22T21:23:43.443Z",
    "who": "B",
    "method": "turn/started",
    "id": "01a1657f-98c3-7bb0-83a5-287d520cbdb0",
    "rootTurnId": "01a1657f-8cda-7fc0-9642-45ee19da74e7",
    "status": "inProgress",
    "startedAt": 1792704223,
    "completedAt": null
  },
  {
    "time": "2026-10-22T21:23:48.175Z",
    "who": "B",
    "method": "item/completed",
    "turnId": "01a1657f-98c3-7bb0-83a5-287d520cbdb0",
    "id": "msg_04a59d7556325c18016ada7ee40de081908bd1878f51ed5bb3",
    "text": "PROBE_FINAL_RESTART",
    "phase": "final_answer"
  },
  {
    "time": "2026-10-22T21:23:48.207Z",
    "who": "B",
    "method": "turn/completed",
    "id": "01a1657f-98c3-7bb0-83a5-287d520cbdb0",
    "rootTurnId": "01a1657f-8cda-7fc0-9642-45ee19da74e7",
    "status": "completed",
    "startedAt": 1792704223,
    "completedAt": 1792704228
  },
  {
    "time": "2026-10-22T21:23:51.095Z",
    "who": "root",
    "method": "turn/completed",
    "id": "01a1657f-8cda-7fc0-9642-45ee19da74e7",
    "rootTurnId": "01a1657f-8cda-7fc0-9642-45ee19da74e7",
    "status": "completed",
    "startedAt": 1792704220,
    "completedAt": 1792704231
  },
  {
    "time": "2026-10-22T21:24:33.328Z",
    "who": "root",
    "method": "turn/started",
    "id": "01a16580-5b88-7671-9112-b40fcddaf240",
    "rootTurnId": "01a16580-5b88-7671-9112-b40fcddaf240",
    "status": "inProgress",
    "startedAt": 1792704273,
    "completedAt": null
  },
  {
    "time": "2026-10-22T21:24:37.405Z",
    "who": "B",
    "method": "turn/started",
    "id": "01a16580-6b95-7e30-8ead-86e92aaad6b2",
    "rootTurnId": "01a16580-5b88-7671-9112-b40fcddaf240",
    "status": "inProgress",
    "startedAt": 1792704277,
    "completedAt": null
  },
  {
    "time": "2026-10-22T21:24:40.134Z",
    "who": "root",
    "method": "item/completed",
    "turnId": "01a16580-5b88-7671-9112-b40fcddaf240",
    "id": "msg_0a541a721a4a4e56016ada7f178bc88194bb46d4fe5e6f2fce",
    "text": "FINAL_DISPATCHED_NO_WAIT",
    "phase": "final_answer"
  },
  {
    "time": "2026-10-22T21:24:40.264Z",
    "who": "root",
    "method": "turn/completed",
    "id": "01a16580-5b88-7671-9112-b40fcddaf240",
    "rootTurnId": "01a16580-5b88-7671-9112-b40fcddaf240",
    "status": "completed",
    "startedAt": 1792704273,
    "completedAt": 1792704280
  },
  {
    "time": "2026-10-22T21:24:40.655Z",
    "who": "C",
    "method": "turn/started",
    "id": "01a16580-7848-7002-9124-edcfe2f4595c",
    "rootTurnId": "01a16580-5b88-7671-9112-b40fcddaf240",
    "status": "inProgress",
    "startedAt": 1792704280,
    "completedAt": null
  },
  {
    "time": "2026-10-22T21:24:57.157Z",
    "who": "C",
    "method": "item/completed",
    "turnId": "01a16580-7848-7002-9124-edcfe2f4595c",
    "id": "msg_04a59d7556325c18016ada7f290818819096ef32c1920aba5f",
    "text": "NESTED_FINAL_RESTART",
    "phase": "final_answer"
  },
  {
    "time": "2026-10-22T21:24:57.251Z",
    "who": "C",
    "method": "turn/completed",
    "id": "01a16580-7848-7002-9124-edcfe2f4595c",
    "rootTurnId": "01a16580-5b88-7671-9112-b40fcddaf240",
    "status": "completed",
    "startedAt": 1792704280,
    "completedAt": 1792704297
  },
  {
    "time": "2026-10-22T21:24:59.683Z",
    "who": "B",
    "method": "item/completed",
    "turnId": "01a16580-6b95-7e30-8ead-86e92aaad6b2",
    "id": "msg_04a59d7556325c18016ada7f2b7e248190bc6a341449cddd34",
    "text": "NESTED_FINAL_RESTART",
    "phase": "final_answer"
  },
  {
    "time": "2026-10-22T21:24:59.698Z",
    "who": "B",
    "method": "turn/completed",
    "id": "01a16580-6b95-7e30-8ead-86e92aaad6b2",
    "rootTurnId": "01a16580-5b88-7671-9112-b40fcddaf240",
    "status": "completed",
    "startedAt": 1792704277,
    "completedAt": 1792704299
  }
]
```

## Saved running snapshot (allowlisted)

```json
[
  {
    "id": "node:provider:codex:native-item:call_eee32077fbd945aab647dfd6465d73ba%3A01a16549-d30d-7662-b73f-7ffbb28a3228",
    "childThreadId": "thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "parentNodeId": "node:run:run%3Athread%3Athread%253Aproject%253Aa871b94f-ac15-480d-adab-c32e0a6060f7%253A50d882a4-4a37-485e-a079-f9937ea0a82b%3Aordinal%3A8:root",
    "status": "running",
    "startedAt": "2026-10-22T21:24:37.000Z",
    "completedAt": null,
    "updatedAt": "2026-10-22T21:24:37.415Z"
  },
  {
    "id": "node:provider:codex:native-item:call_dcc4fbdcb6354238900b47b758f4a020%3A01a16566-b9b5-7e41-b1c7-a4297567aa9b",
    "childThreadId": "thread:provider:codex:native-thread:01a16566-b9b5-7e41-b1c7-a4297567aa9b",
    "parentNodeId": "node:provider:codex:native-item:01a16580-6b95-7e30-8ead-86e92aaad6b2%3Athread-root",
    "status": "running",
    "startedAt": "2026-10-22T21:24:40.000Z",
    "completedAt": null,
    "updatedAt": "2026-10-22T21:24:40.661Z"
  }
]
```

## Persisted completed task records and singleton counts

```json
[
  {
    "id": "node:provider:codex:native-item:call_eee32077fbd945aab647dfd6465d73ba%3A01a16549-d30d-7662-b73f-7ffbb28a3228",
    "threadId": "thread:project:a871b94f-ac15-480d-adab-c32e0a6060f7:50d882a4-4a37-485e-a079-f9937ea0a82b",
    "childThreadId": "thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "parentNodeId": "node:run:run%3Athread%3Athread%253Aproject%253Aa871b94f-ac15-480d-adab-c32e0a6060f7%253A50d882a4-4a37-485e-a079-f9937ea0a82b%3Aordinal%3A8:root",
    "status": "completed",
    "result": "NESTED_FINAL_RESTART",
    "startedAt": "2026-10-22T21:24:37.000Z",
    "completedAt": "2026-10-22T21:24:59.000Z",
    "updatedAt": "2026-10-22T21:24:59.698Z",
    "originalIdCount": 1,
    "childThreadCount": 1
  },
  {
    "id": "node:provider:codex:native-item:call_dcc4fbdcb6354238900b47b758f4a020%3A01a16566-b9b5-7e41-b1c7-a4297567aa9b",
    "threadId": "thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "childThreadId": "thread:provider:codex:native-thread:01a16566-b9b5-7e41-b1c7-a4297567aa9b",
    "parentNodeId": "node:provider:codex:native-item:01a16580-6b95-7e30-8ead-86e92aaad6b2%3Athread-root",
    "status": "completed",
    "result": "NESTED_FINAL_RESTART",
    "startedAt": "2026-10-22T21:24:40.000Z",
    "completedAt": "2026-10-22T21:24:57.251Z",
    "updatedAt": "2026-10-22T21:24:57.253Z",
    "originalIdCount": 1,
    "childThreadCount": 1
  }
]
```

## Persisted provider turns (ordinals)

```json
[
  {
    "id": "provider-turn:provider:codex:native-turn:01a16549-d33a-7a91-9639-bc181f5b36f1",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "nodeId": "node:provider:codex:native-item:call_eee32077fbd945aab647dfd6465d73ba%3A01a16549-d30d-7662-b73f-7ffbb28a3228%3Athread-root",
    "ordinal": 1,
    "status": "completed",
    "startedAt": "2026-10-22T20:24:59.000Z",
    "completedAt": "2026-10-22T20:25:02.000Z"
  },
  {
    "id": "provider-turn:provider:codex:native-turn:01a16565-d322-7dc2-9089-584340d45151",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "nodeId": "node:provider:codex:native-item:01a16565-d322-7dc2-9089-584340d45151%3Athread-root",
    "ordinal": 2,
    "status": "completed",
    "startedAt": "2026-10-22T20:55:34.000Z",
    "completedAt": "2026-10-22T20:55:37.000Z"
  },
  {
    "id": "provider-turn:provider:codex:native-turn:01a16566-a51a-7083-972a-ab2258b426fe",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "nodeId": "node:provider:codex:native-item:01a16566-a51a-7083-972a-ab2258b426fe%3Athread-root",
    "ordinal": 3,
    "status": "completed",
    "startedAt": "2026-10-22T20:56:28.000Z",
    "completedAt": "2026-10-22T20:56:39.000Z"
  },
  {
    "id": "provider-turn:provider:codex:native-turn:01a16566-b9ea-7810-b637-06a4abbbadc4",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16566-b9b5-7e41-b1c7-a4297567aa9b",
    "nodeId": "node:provider:codex:native-item:call_dcc4fbdcb6354238900b47b758f4a020%3A01a16566-b9b5-7e41-b1c7-a4297567aa9b%3Athread-root",
    "ordinal": 1,
    "status": "completed",
    "startedAt": "2026-10-22T20:56:33.000Z",
    "completedAt": "2026-10-22T20:56:36.000Z"
  },
  {
    "id": "provider-turn:provider:codex:native-turn:01a16567-c3f5-7163-8683-4e31c80a1398",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "nodeId": "node:provider:codex:native-item:01a16567-c3f5-7163-8683-4e31c80a1398%3Athread-root",
    "ordinal": 4,
    "status": "completed",
    "startedAt": "2026-10-22T20:57:41.000Z",
    "completedAt": "2026-10-22T20:58:20.000Z"
  },
  {
    "id": "provider-turn:provider:codex:native-turn:01a1657f-98c3-7bb0-83a5-287d520cbdb0",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "nodeId": "node:provider:codex:native-item:01a1657f-98c3-7bb0-83a5-287d520cbdb0%3Athread-root",
    "ordinal": 5,
    "status": "completed",
    "startedAt": "2026-10-22T21:23:43.000Z",
    "completedAt": "2026-10-22T21:23:48.000Z"
  },
  {
    "id": "provider-turn:provider:codex:native-turn:01a16580-6b95-7e30-8ead-86e92aaad6b2",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "nodeId": "node:provider:codex:native-item:01a16580-6b95-7e30-8ead-86e92aaad6b2%3Athread-root",
    "ordinal": 6,
    "status": "completed",
    "startedAt": "2026-10-22T21:24:37.000Z",
    "completedAt": "2026-10-22T21:24:59.000Z"
  },
  {
    "id": "provider-turn:provider:codex:native-turn:01a16580-7848-7002-9124-edcfe2f4595c",
    "providerThreadId": "provider-thread:provider:codex:native-thread:01a16566-b9b5-7e41-b1c7-a4297567aa9b",
    "nodeId": "node:provider:codex:native-item:01a16580-7848-7002-9124-edcfe2f4595c%3Athread-root",
    "ordinal": 2,
    "status": "completed",
    "startedAt": "2026-10-22T21:24:40.000Z",
    "completedAt": "2026-10-22T21:24:57.000Z"
  }
]
```

## Persisted exact final messages

```json
[
  {
    "id": "message:provider:codex:native-item:msg_04a59d7556325c18016ada7ee40de081908bd1878f51ed5bb3",
    "threadId": "thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "text": "PROBE_FINAL_RESTART",
    "streaming": false,
    "createdAt": "2026-10-22T21:23:48.148Z",
    "updatedAt": "2026-10-22T21:23:48.176Z"
  },
  {
    "id": "message:provider:codex:native-item:msg_04a59d7556325c18016ada7f290818819096ef32c1920aba5f",
    "threadId": "thread:provider:codex:native-thread:01a16566-b9b5-7e41-b1c7-a4297567aa9b",
    "text": "NESTED_FINAL_RESTART",
    "streaming": false,
    "createdAt": "2026-10-22T21:24:57.153Z",
    "updatedAt": "2026-10-22T21:24:57.157Z"
  },
  {
    "id": "message:provider:codex:native-item:msg_04a59d7556325c18016ada7f2b7e248190bc6a341449cddd34",
    "threadId": "thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "text": "NESTED_FINAL_RESTART",
    "streaming": false,
    "createdAt": "2026-10-22T21:24:59.674Z",
    "updatedAt": "2026-10-22T21:24:59.683Z"
  }
]
```

## Lineage equality

```json
{
  "cParentNodeId": "node:provider:codex:native-item:01a16580-6b95-7e30-8ead-86e92aaad6b2%3Athread-root",
  "bResumedTurnNodeId": "node:provider:codex:native-item:01a16580-6b95-7e30-8ead-86e92aaad6b2%3Athread-root",
  "equal": true
}
```

FRICTION evidence-schema | shorthand table names were absent and orchestration_v2_events was empty | inspect sqlite schema first; use prefixed projection tables and saved running snapshot plus native events.

## Saved first-restart completed projection

```json
[
  {
    "id": "node:provider:codex:native-item:call_eee32077fbd945aab647dfd6465d73ba%3A01a16549-d30d-7662-b73f-7ffbb28a3228",
    "childThreadId": "thread:provider:codex:native-thread:01a16549-d30d-7662-b73f-7ffbb28a3228",
    "status": "completed",
    "result": "PROBE_FINAL_RESTART",
    "startedAt": "2026-10-22T21:23:43.000Z",
    "completedAt": "2026-10-22T21:23:48.206Z",
    "updatedAt": "2026-10-22T21:23:48.211Z"
  }
]
```

First-restart running projection at 21:23:43.450Z was reported by primary; its completed projection above was independently read. Nested running → completed projections are both directly captured above.
