Commit Graph
2 Commits
Author SHA1 Message Date
Brent Traut c92700d299 Backfill exec completion items through paginated history (#57800)
## Why

`codex exec` recovers turn items at completion because item notifications can be dropped under backpressure. This recovery needs to respect the thread's history mode.

## What changed

For paginated threads, fetch every page from `thread/items/list`, scoped to the completed turn. Preserve items already present in the completion notification when merging the recovered history, and stop recovery if a cursor repeats. Keep `thread/read` recovery for other history modes.

## Testing

Add regression coverage for recovering a final answer across multiple item pages and for a failed fork recovering only its own turn.

GitOrigin-RevId: f005ca2cf9d8313bbbf32ed4c228ebb5e51428a2
2026-10-28 18:03:57 +00:00
Charlie Marsh 7844386e3d Backfill completion items only for the active exec turn (#34226)
## Why

Multi-agent exec sessions can receive child `turn/completed` notifications on
the same event stream as the primary turn. Backfilling those unrelated
completions issues unnecessary `thread/read` requests.

## What changed

Run completion-item backfill only after a notification has been matched to the
primary exec thread and turn.

## Testing

Add an integration test that delivers a child completion before the primary
completion and verifies that only the primary completion triggers backfill.

GitOrigin-RevId: 46a41236ee6a39e4b341570ff4826a71fa02bb32
2026-07-19 20:36:18 +00:00