# G1: Baseline recovery, compaction items and failure exits — before

SHA: [938b4d4525](https://git.cafe/pingdotgg/t3code/commit/938b4d45255fa92c11a03e0a5e946b2e438aabb3)

**synthetic integration harness, not a live provider**

Node v26.12.1; Vite+ vp test / Vitest v5.0.5; ProviderReplayHarness.layerWithRegistry, synthetic adapters and in-memory SQLite; Linux x86_64, kernel 6.1.102. No live provider, dev server, real database or client browser used for capture.

Same byte-identical driver/fixtures; no compile adaptation. Only synthetic data. Timestamps and model selection omitted. Event sequence numbers establish order. This records server data, with no claim about rendered clients or native-provider protocols. Text truncation is explicit. Run aliases below resolve to the complete ids in each scenario; ordinals may advance when a queued run starts. Request 2 is deliberately rejected before provider acceptance to establish a missed backlog.

## background-counts

Configuration: `{"group":"G1","name":"background-counts","background":true,"items":"counts"}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":59,"unchangedRunCount":3,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
56: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## background-no-counts

Configuration: `{"group":"G1","name":"background-no-counts","background":true,"items":"no-counts"}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":59,"unchangedRunCount":3,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
56: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## compact-item-failure-summary

Configuration: `{"group":"G1","name":"compact-item-failure-summary","background":true,"compactFailure":true,"queue":"automatic","items":"no-counts","compactSummary":"Synthetic compaction failure summary"}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:4 sequence=60
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":65,"unchangedRunCount":4,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
58: node r4 pending
61: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
65: run r4 ordinal=4 queued {"queueHeld":true}
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"evidence:4","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"queueHeld":true,"queuePosition":1}}
{"checkpoint":"queued-before-release (hold seeded via synthetic event sink)","queue":[{"alias":"r4","status":"queued","held":null,"position":1}]}
{"checkpoint":"queue-after-recovery","queue":[{"alias":"r4","status":"queued","held":true,"position":1}]}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## compact-item-failure

Configuration: `{"group":"G1","name":"compact-item-failure","background":true,"compactFailure":true,"queue":"automatic","items":"no-counts"}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:4 sequence=60
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":65,"unchangedRunCount":4,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
58: node r4 pending
61: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
65: run r4 ordinal=4 queued {"queueHeld":true}
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"evidence:4","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"queueHeld":true,"queuePosition":1}}
{"checkpoint":"queued-before-release (hold seeded via synthetic event sink)","queue":[{"alias":"r4","status":"queued","held":null,"position":1}]}
{"checkpoint":"queue-after-recovery","queue":[{"alias":"r4","status":"queued","held":true,"position":1}]}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## compact-start-failure

Configuration: `{"group":"G1","name":"compact-start-failure","background":true,"compactStartFailure":true,"queue":"automatic"}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:4 sequence=60
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":65,"unchangedRunCount":4,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
58: node r4 pending
61: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
65: run r4 ordinal=4 queued {"queueHeld":true}
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"evidence:4","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"queueHeld":true,"queuePosition":1}}
{"checkpoint":"queued-before-release (hold seeded via synthetic event sink)","queue":[{"alias":"r4","status":"queued","held":null,"position":1}]}
{"checkpoint":"queue-after-recovery","queue":[{"alias":"r4","status":"queued","held":true,"position":1}]}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## continuation-failure

Configuration: `{"group":"G1","name":"continuation-failure","background":true,"failContinuation":true,"queue":"automatic"}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:4 sequence=60
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":65,"unchangedRunCount":4,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
58: node r4 pending
61: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
65: run r4 ordinal=4 queued {"queueHeld":true}
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"evidence:4","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"queueHeld":true,"queuePosition":1}}
{"checkpoint":"queued-before-release (hold seeded via synthetic event sink)","queue":[{"alias":"r4","status":"queued","held":null,"position":1}]}
{"checkpoint":"queue-after-recovery","queue":[{"alias":"r4","status":"queued","held":true,"position":1}]}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## fit-control

Configuration: `{"group":"G1","name":"fit-control","background":true,"fit":true}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | completed | `codex:thread:evidence:0` | Fits budget CODEWORD_FIT | — |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
provider input: r2 app-ordinal=2 native=codex:thread:evidence:0 text="Fits budget CODEWORD_FIT" length=24 attachments=[]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":51,"unchangedRunCount":2,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":20000,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":20000,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
44: attempt r2 completed
45: run r2 ordinal=2 waiting
46: node r2 waiting
50: run r2 ordinal=2 completed
51: node r2 completed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
{"runId":"r2","status":"completed","text":"codex response for run 2","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## image-attachment-recovery

Configuration: `{"group":"G1","name":"image-attachment-recovery","background":true,"items":"counts","image":true}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":59,"unchangedRunCount":3,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
56: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```

## repeated-refusal-before

Configuration: `{"group":"G1","name":"repeated-refusal-before","background":true,"repeat":true}`

Native generations: 1; final snoozedUntil: `None`.

| Alias / run id | Ordinal | Status | Native id on attempt | Message | Failure code / message |
| --- | ---: | --- | --- | --- | --- |
| r1: `run:thread:thread%3Aevidence:ordinal:1` | 1 | completed | `codex:thread:evidence:0` | Original brief CODEWORD_ORIGINAL | — |
| r2: `run:thread:thread%3Aevidence:ordinal:2` | 2 | failed | `codex:thread:evidence:0` | Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total] | None: Provider turn failed. |
| r3: `run:thread:thread%3Aevidence:ordinal:3` | 3 | failed | `not recorded; not accepted` | Request 3 CODEWORD_RECOVER | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | failed | `not recorded; not accepted` | Request 4 repeat refusal | None: The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff. |

Adapter calls, provider inputs and relevant results, in call order:
```text
dispatch receipt: message=evidence:1 sequence=9
ensureThread: create a synthetic native session
provider input: r1 app-ordinal=1 native=codex:thread:evidence:0 text="Original brief CODEWORD_ORIGINAL" length=32 attachments=[]
dispatch receipt: message=evidence:2 sequence=35
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:3 sequence=54
resumeThread: codex:thread:evidence:0
dispatch receipt: message=evidence:4 sequence=67
resumeThread: codex:thread:evidence:0
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":72,"unchangedRunCount":4,"note":"in-process event replay and projection re-read; no network reconnect or crash tested"}
```

Persisted lifecycle, compaction and usage milestones, in sequence order:
```text
3: native session state {"contextUsage":null}
6: node r1 pending
12: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":null}
13: run r1 ordinal=1 running
14: attempt r1 running
15: node r1 running
16: provider usage r1 {"usedTokens":250164,"maxTokens":258400}
19: attempt r1 completed
20: run r1 ordinal=1 waiting
21: node r1 waiting
26: run r1 ordinal=1 completed
27: node r1 completed
32: node r2 pending
38: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":250164,"maxTokens":258400}}
39: run r2 ordinal=2 running
40: attempt r2 running
41: node r2 running
42: attempt r2 failed
43: error r2 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Provider turn failed.","code":null,"retryable":null}}
44: run r2 ordinal=2 failed
45: node r2 failed
51: node r3 pending
56: error r3 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
64: node r4 pending
69: error r4 {"status":"failed","title":"Provider turn failed to start","failure":{"class":"provider_error","message":"The target provider still has background work running. Wait for it to finish or stop it before retrying the handoff.","code":null,"retryable":null}}
70: run r4 ordinal=4 failed
71: attempt r4 failed
72: node r4 failed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
```
