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

SHA: [3d864ff44f](https://git.cafe/pingdotgg/t3code/commit/3d864ff44fec8f84dc7a10e75860d7880d69c40e)

**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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | completed | `codex:thread:evidence:0` | /compact | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | completed | `codex:thread:evidence:0` | Continue where you left off. | — |

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
compactThread: r4 native=codex:thread:evidence:0
provider input: r4 app-ordinal=4 native=codex:thread:evidence:0 text="/compact" length=8 attachments=[]
provider input: r5 app-ordinal=5 native=codex:thread:evidence:0 text="Continue where you left off." length=28 attachments=[]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":110,"unchangedRunCount":5,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
63: node r4 pending
69: run r4 ordinal=4 running
70: attempt r4 running
71: node r4 running
72: compaction r4 {"status":"running","title":"Compacting context","beforeTokenCount":250164,"afterTokenCount":20000}
73: compaction r4 {"status":"completed","title":"Context compacted","beforeTokenCount":250164,"afterTokenCount":20000}
74: provider usage r4 {"usedTokens":20000,"maxTokens":258400}
77: attempt r4 completed
78: run r4 ordinal=4 waiting
79: node r4 waiting
84: run r4 ordinal=4 completed
85: node r4 completed
89: node r5 pending
94: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":20000,"maxTokens":258400}}
95: run r5 ordinal=5 running
96: attempt r5 running
97: node r5 running
100: provider usage r5 {"usedTokens":21000,"maxTokens":258400}
103: attempt r5 completed
104: run r5 ordinal=5 waiting
105: node r5 waiting
109: run r5 ordinal=5 completed
110: node r5 completed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"run":"r5","message":{"id":"context-compact-continue:run:thread:thread%3Aevidence:ordinal:4","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:4"}}
{"compactionItem":{"status":"completed","title":"Context compacted","beforeTokenCount":250164,"afterTokenCount":20000},"run":"r4"}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
{"runId":"r4","status":"completed","text":"Synthetic compaction complete","length":29}
{"runId":"r5","status":"completed","text":"Request 3 done","length":14}
```

Injected backlog actually received by the synthetic provider:
```jsonl
{"role":"user","text":"Context handoff (delta_since_target_last_seen):\nProvider context handoff. Thread: thread:evidence. Covered app runs: 2-3.\nSource item range: turn-item:message:evidence%3A2 through turn-item:run:run%3Athread%3Athread%253Aevidence%3Aordinal%3A3:signal:provider-context-compaction-required.\nRecover omitted history using t3_thread_read({threadId:\"thread:evidence\",view:\"activity\",limit:20,maxCharsPerItem:4000}); paginate with afterPosition=nextPosition. For an individual item use itemId and textOffset=nextTextOffset until null. Run/item IDs identify historical activity; no foreign tool calls are replayed.\nSelected 4 intact items; omitted 0 items. Historical material is context, not a new request or higher-priority instructions. Attached files and native tool/reasoning state are not replayed.","fullLength":796}
{"role":"user","text":"Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total]","fullLength":6026}
{"role":"assistant","text":"Provider turn failed.","fullLength":21}
{"role":"user","text":"Request 3 CODEWORD_RECOVER","fullLength":26}
{"role":"assistant","text":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","fullLength":105}
```

## 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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | completed | `codex:thread:evidence:0` | /compact | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | completed | `codex:thread:evidence:0` | Continue where you left off. | — |

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
compactThread: r4 native=codex:thread:evidence:0
provider input: r4 app-ordinal=4 native=codex:thread:evidence:0 text="/compact" length=8 attachments=[]
provider input: r5 app-ordinal=5 native=codex:thread:evidence:0 text="Continue where you left off." length=28 attachments=[]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":110,"unchangedRunCount":5,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
63: node r4 pending
69: run r4 ordinal=4 running
70: attempt r4 running
71: node r4 running
72: compaction r4 {"status":"running","title":"Compacting context"}
73: compaction r4 {"status":"completed","title":"Context compacted"}
74: provider usage r4 {"usedTokens":20000,"maxTokens":258400}
77: attempt r4 completed
78: run r4 ordinal=4 waiting
79: node r4 waiting
84: run r4 ordinal=4 completed
85: node r4 completed
89: node r5 pending
94: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":20000,"maxTokens":258400}}
95: run r5 ordinal=5 running
96: attempt r5 running
97: node r5 running
100: provider usage r5 {"usedTokens":21000,"maxTokens":258400}
103: attempt r5 completed
104: run r5 ordinal=5 waiting
105: node r5 waiting
109: run r5 ordinal=5 completed
110: node r5 completed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"run":"r5","message":{"id":"context-compact-continue:run:thread:thread%3Aevidence:ordinal:4","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:4"}}
{"compactionItem":{"status":"completed","title":"Context compacted"},"run":"r4"}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
{"runId":"r4","status":"completed","text":"Synthetic compaction complete","length":29}
{"runId":"r5","status":"completed","text":"Request 3 done","length":14}
```

Injected backlog actually received by the synthetic provider:
```jsonl
{"role":"user","text":"Context handoff (delta_since_target_last_seen):\nProvider context handoff. Thread: thread:evidence. Covered app runs: 2-3.\nSource item range: turn-item:message:evidence%3A2 through turn-item:run:run%3Athread%3Athread%253Aevidence%3Aordinal%3A3:signal:provider-context-compaction-required.\nRecover omitted history using t3_thread_read({threadId:\"thread:evidence\",view:\"activity\",limit:20,maxCharsPerItem:4000}); paginate with afterPosition=nextPosition. For an individual item use itemId and textOffset=nextTextOffset until null. Run/item IDs identify historical activity; no foreign tool calls are replayed.\nSelected 4 intact items; omitted 0 items. Historical material is context, not a new request or higher-priority instructions. Attached files and native tool/reasoning state are not replayed.","fullLength":796}
{"role":"user","text":"Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total]","fullLength":6026}
{"role":"assistant","text":"Provider turn failed.","fullLength":21}
{"role":"user","text":"Request 3 CODEWORD_RECOVER","fullLength":26}
{"role":"assistant","text":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","fullLength":105}
```

## 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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | failed | `codex:thread:evidence:0` | /compact | simulated_failure: Simulated provider failure. |

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
compactThread: r5 native=codex:thread:evidence:0
provider input: r5 app-ordinal=5 native=codex:thread:evidence:0 text="/compact" length=8 attachments=[]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":87,"unchangedRunCount":5,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
68: node r5 pending
74: run r5 ordinal=5 running
75: attempt r5 running
76: node r5 running
77: compaction r5 {"status":"running","title":"Compacting context"}
78: compaction r5 {"status":"failed","title":"Context compaction failed"}
79: provider usage r5 {"usedTokens":20000,"maxTokens":258400}
82: error r5 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Simulated provider failure.","code":"simulated_failure","retryable":null}}
83: attempt r5 failed
84: run r5 ordinal=5 failed
85: node r5 failed
87: 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}}
{"run":"r5","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"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}]}
{"compactionItem":{"status":"failed","title":"Context compaction failed","summary":"Synthetic compaction failure summary"},"run":"r5"}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
{"runId":"r5","status":"failed","text":"Synthetic compaction complete","length":29}
```

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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | failed | `codex:thread:evidence:0` | /compact | simulated_failure: Simulated provider failure. |

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
compactThread: r5 native=codex:thread:evidence:0
provider input: r5 app-ordinal=5 native=codex:thread:evidence:0 text="/compact" length=8 attachments=[]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":87,"unchangedRunCount":5,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
68: node r5 pending
74: run r5 ordinal=5 running
75: attempt r5 running
76: node r5 running
77: compaction r5 {"status":"running","title":"Compacting context"}
78: compaction r5 {"status":"failed","title":"Context compaction failed"}
79: provider usage r5 {"usedTokens":20000,"maxTokens":258400}
82: error r5 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Simulated provider failure.","code":"simulated_failure","retryable":null}}
83: attempt r5 failed
84: run r5 ordinal=5 failed
85: node r5 failed
87: 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}}
{"run":"r5","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"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}]}
{"compactionItem":{"status":"failed","title":"Context compaction failed"},"run":"r5"}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
{"runId":"r5","status":"failed","text":"Synthetic compaction complete","length":29}
```

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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | failed | `codex:thread:evidence:0` | /compact | None: The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs. |

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
compactThread: r5 native=codex:thread:evidence:0
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":82,"unchangedRunCount":5,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
68: node r5 pending
74: run r5 ordinal=5 running
75: attempt r5 running
76: node r5 running
77: attempt r5 failed
78: error r5 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs.","code":null,"retryable":null}}
79: run r5 ordinal=5 failed
80: node r5 failed
82: 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}}
{"run":"r5","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | queued | `not recorded; not accepted` | QUEUED_PAYLOAD after recovery | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | completed | `codex:thread:evidence:0` | /compact | — |
| r6: `run:thread:thread%3Aevidence:ordinal:6` | 6 | failed | `codex:thread:evidence:0` | Continue where you left off. | simulated_failure: Simulated provider failure. |

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
compactThread: r5 native=codex:thread:evidence:0
provider input: r5 app-ordinal=5 native=codex:thread:evidence:0 text="/compact" length=8 attachments=[]
provider input: r6 app-ordinal=6 native=codex:thread:evidence:0 text="Continue where you left off." length=28 attachments=[]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":111,"unchangedRunCount":6,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
62: run r3 ordinal=3 failed
63: attempt r3 failed
64: node r3 failed
68: node r5 pending
74: run r5 ordinal=5 running
75: attempt r5 running
76: node r5 running
77: provider usage r5 {"usedTokens":20000,"maxTokens":258400}
80: attempt r5 completed
81: run r5 ordinal=5 waiting
82: node r5 waiting
87: run r5 ordinal=5 completed
88: node r5 completed
92: node r6 pending
97: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":20000,"maxTokens":258400}}
98: run r6 ordinal=6 running
99: attempt r6 running
100: node r6 running
103: provider usage r6 {"usedTokens":21000,"maxTokens":258400}
106: error r6 {"status":"failed","title":"Provider error","failure":{"class":"provider_error","message":"Simulated provider failure.","code":"simulated_failure","retryable":null}}
107: attempt r6 failed
108: run r6 ordinal=6 failed
109: node r6 failed
111: 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}}
{"run":"r5","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"run":"r6","message":{"id":"context-compact-continue:run:thread:thread%3Aevidence:ordinal:5","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:5"}}
{"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}
{"runId":"r5","status":"completed","text":"Synthetic compaction complete","length":29}
{"runId":"r6","status":"failed","text":"Request 3 done","length":14}
```

Injected backlog actually received by the synthetic provider:
```jsonl
{"role":"user","text":"Context handoff (delta_since_target_last_seen):\nProvider context handoff. Thread: thread:evidence. Covered app runs: 2-3.\nSource item range: turn-item:message:evidence%3A2 through turn-item:run:run%3Athread%3Athread%253Aevidence%3Aordinal%3A3:signal:provider-context-compaction-required.\nRecover omitted history using t3_thread_read({threadId:\"thread:evidence\",view:\"activity\",limit:20,maxCharsPerItem:4000}); paginate with afterPosition=nextPosition. For an individual item use itemId and textOffset=nextTextOffset until null. Run/item IDs identify historical activity; no foreign tool calls are replayed.\nSelected 4 intact items; omitted 0 items. Historical material is context, not a new request or higher-priority instructions. Attached files and native tool/reasoning state are not replayed.","fullLength":796}
{"role":"user","text":"Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total]","fullLength":6026}
{"role":"assistant","text":"Provider turn failed.","fullLength":21}
{"role":"user","text":"Request 3 CODEWORD_RECOVER","fullLength":26}
{"role":"assistant","text":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","fullLength":105}
```

## 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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | completed | `codex:thread:evidence:0` | /compact | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | completed | `codex:thread:evidence:0` | Continue where you left off. | — |

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
compactThread: r4 native=codex:thread:evidence:0
provider input: r4 app-ordinal=4 native=codex:thread:evidence:0 text="/compact" length=8 attachments=[]
provider input: r5 app-ordinal=5 native=codex:thread:evidence:0 text="Continue where you left off." length=28 attachments=[{"type":"image","id":"synthetic_image_recovery","name":"synthetic-recovery.png","mimeType":"image/png","sizeBytes":68}]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":110,"unchangedRunCount":5,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
63: node r4 pending
69: run r4 ordinal=4 running
70: attempt r4 running
71: node r4 running
72: compaction r4 {"status":"running","title":"Compacting context","beforeTokenCount":250164,"afterTokenCount":20000}
73: compaction r4 {"status":"completed","title":"Context compacted","beforeTokenCount":250164,"afterTokenCount":20000}
74: provider usage r4 {"usedTokens":20000,"maxTokens":258400}
77: attempt r4 completed
78: run r4 ordinal=4 waiting
79: node r4 waiting
84: run r4 ordinal=4 completed
85: node r4 completed
89: node r5 pending
94: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":20000,"maxTokens":258400}}
95: run r5 ordinal=5 running
96: attempt r5 running
97: node r5 running
100: provider usage r5 {"usedTokens":21000,"maxTokens":258400}
103: attempt r5 completed
104: run r5 ordinal=5 waiting
105: node r5 waiting
109: run r5 ordinal=5 completed
110: node r5 completed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"run":"r5","message":{"id":"context-compact-continue:run:thread:thread%3Aevidence:ordinal:4","createdBy":"agent","creationSource":"server","attachmentCount":1,"attachments":[{"type":"image","id":"synthetic_image_recovery","name":"synthetic-recovery.png","mimeType":"image/png","sizeBytes":68}]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:4"}}
{"compactionItem":{"status":"completed","title":"Context compacted","beforeTokenCount":250164,"afterTokenCount":20000},"run":"r4"}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
{"runId":"r4","status":"completed","text":"Synthetic compaction complete","length":29}
{"runId":"r5","status":"completed","text":"Request 3 done","length":14}
```

Injected backlog actually received by the synthetic provider:
```jsonl
{"role":"user","text":"Context handoff (delta_since_target_last_seen):\nProvider context handoff. Thread: thread:evidence. Covered app runs: 2-3.\nSource item range: turn-item:message:evidence%3A2 through turn-item:run:run%3Athread%3Athread%253Aevidence%3Aordinal%3A3:signal:provider-context-compaction-required.\nRecover omitted history using t3_thread_read({threadId:\"thread:evidence\",view:\"activity\",limit:20,maxCharsPerItem:4000}); paginate with afterPosition=nextPosition. For an individual item use itemId and textOffset=nextTextOffset until null. Run/item IDs identify historical activity; no foreign tool calls are replayed.\nSelected 4 intact items; omitted 0 items. Historical material is context, not a new request or higher-priority instructions. Attached files and native tool/reasoning state are not replayed.","fullLength":796}
{"role":"user","text":"Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total]","fullLength":6026}
{"role":"assistant","text":"Provider turn failed.","fullLength":21}
{"role":"user","text":"Request 3 CODEWORD_RECOVER","fullLength":26}
{"role":"assistant","text":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","fullLength":105}
```

## 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 | context_compaction_required: The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically. |
| r4: `run:thread:thread%3Aevidence:ordinal:4` | 4 | completed | `codex:thread:evidence:0` | /compact | — |
| r5: `run:thread:thread%3Aevidence:ordinal:5` | 5 | completed | `codex:thread:evidence:0` | Continue where you left off. | — |
| r6: `run:thread:thread%3Aevidence:ordinal:6` | 6 | completed | `codex:thread:evidence:0` | Request 4 repeat refusal | — |

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
compactThread: r4 native=codex:thread:evidence:0
provider input: r4 app-ordinal=4 native=codex:thread:evidence:0 text="/compact" length=8 attachments=[]
provider input: r5 app-ordinal=5 native=codex:thread:evidence:0 text="Continue where you left off." length=28 attachments=[]
dispatch receipt: message=evidence:4 sequence=116
resumeThread: codex:thread:evidence:0
provider input: r6 app-ordinal=6 native=codex:thread:evidence:0 text="Request 4 repeat refusal" length=24 attachments=[]
{"operation":"persistedEventReplayAndProjectionReread","throughSequence":132,"unchangedRunCount":6,"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":"Conversation compaction needed","failure":{"class":"provider_error","message":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","code":"context_compaction_required","retryable":null}}
57: run r3 ordinal=3 failed
58: attempt r3 failed
59: node r3 failed
63: node r4 pending
69: run r4 ordinal=4 running
70: attempt r4 running
71: node r4 running
72: provider usage r4 {"usedTokens":20000,"maxTokens":258400}
75: attempt r4 completed
76: run r4 ordinal=4 waiting
77: node r4 waiting
82: run r4 ordinal=4 completed
83: node r4 completed
87: node r5 pending
92: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":20000,"maxTokens":258400}}
93: run r5 ordinal=5 running
94: attempt r5 running
95: node r5 running
98: provider usage r5 {"usedTokens":21000,"maxTokens":258400}
101: attempt r5 completed
102: run r5 ordinal=5 waiting
103: node r5 waiting
107: run r5 ordinal=5 completed
108: node r5 completed
113: node r6 pending
119: native session state {"nativeThreadId":"codex:thread:evidence:0","contextUsage":{"usedTokens":21000,"maxTokens":258400}}
120: run r6 ordinal=6 running
121: attempt r6 running
122: node r6 running
125: attempt r6 completed
126: run r6 ordinal=6 waiting
127: node r6 waiting
131: run r6 ordinal=6 completed
132: node r6 completed
```

Generated-message provenance, linkage, queue checkpoints and final answers:
```jsonl
{"run":"r4","message":{"id":"context-compact:run:thread:thread%3Aevidence:ordinal:3","createdBy":"agent","creationSource":"server","idleCompaction":"onReturn","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:3"}}
{"run":"r5","message":{"id":"context-compact-continue:run:thread:thread%3Aevidence:ordinal:4","createdBy":"agent","creationSource":"server","attachmentCount":0,"attachments":[]},"linkage":{"compactionRecoveryOfRunId":"run:thread:thread%3Aevidence:ordinal:4"}}
{"runId":"r1","status":"completed","text":"codex response for run 1","length":24}
{"runId":"r4","status":"completed","text":"Synthetic compaction complete","length":29}
{"runId":"r5","status":"completed","text":"Request 3 done","length":14}
{"runId":"r6","status":"completed","text":"codex response for run 6","length":24}
```

Injected backlog actually received by the synthetic provider:
```jsonl
{"role":"user","text":"Context handoff (delta_since_target_last_seen):\nProvider context handoff. Thread: thread:evidence. Covered app runs: 2-3.\nSource item range: turn-item:message:evidence%3A2 through turn-item:run:run%3Athread%3Athread%253Aevidence%3Aordinal%3A3:signal:provider-context-compaction-required.\nRecover omitted history using t3_thread_read({threadId:\"thread:evidence\",view:\"activity\",limit:20,maxCharsPerItem:4000}); paginate with afterPosition=nextPosition. For an individual item use itemId and textOffset=nextTextOffset until null. Run/item IDs identify historical activity; no foreign tool calls are replayed.\nSelected 4 intact items; omitted 0 items. Historical material is context, not a new request or higher-priority instructions. Attached files and native tool/reasoning state are not replayed.","fullLength":796}
{"role":"user","text":"Request 2 CODEWORD_MISSED rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr … [truncated; 6026 characters total]","fullLength":6026}
{"role":"assistant","text":"Provider turn failed.","fullLength":21}
{"role":"user","text":"Request 3 CODEWORD_RECOVER","fullLength":26}
{"role":"assistant","text":"The conversation is too long to continue as is. T3 Code is compacting it and will continue automatically.","fullLength":105}
```
