Files
codex/codex-rs
liame-oai 6f34d3d408 Allow thread sampling after failed or interrupted turns (#56020)
## Why

`thread/sample` previously required the latest source turn to have completed successfully, rejecting failed or interrupted turns even when the source was idle.

## What changed

Accept the latest completed, failed, or interrupted turn in both legacy and paginated history modes. Update the protocol documentation and validation error to reflect the accepted statuses, while continuing to reject stale or active sources.

## Testing

Expand integration coverage across all three terminal statuses and both history modes, checking that sampling preserves context and leaves the source unchanged. Also verify that sampling an active source is rejected before interrupting it.

GitOrigin-RevId: a5dfdb2800868ee178eae16b12ee7f6f9515898c
2026-10-22 00:06:08 +00:00
..
…
…
…