mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## Why Reverse search fetched persistent history one entry at a time, making a deep or unsuccessful search require a lookup for every older entry. ## What changed - Keep the newest-entry probe lightweight, then scan older persistent history in bounded batches. - Cache batch results by absolute offset and preserve continuation cursors across repeated searches. - Ignore stale responses, retry failed batch reads a bounded number of times, and restore the draft without reporting a false “no match” state when history is unavailable. ## Testing - Cover batch continuation, caching after query changes or cancellation, stale metadata, retry exhaustion, and thread routing. - Verify that scanning 1,024 entries uses one single-entry lookup and eight batch lookups. GitOrigin-RevId: efc791fcbd5290050af703dd31c5c21b33240e23