mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:10:37 +00:00
## Why `read_thread` returns at most 20 items per turn, but requesting full turns loads every item in paginated history before trimming the result. ## What changed For paginated threads, request turn metadata without items, then fetch the newest 20 items per turn concurrently through `thread/items/list`. Restore chronological item order before building the response and share the item limit with the summary code. ## Testing Add a regression test that verifies the newest 20 items are returned in order with `includeOutputs` both enabled and disabled. GitOrigin-RevId: ba73a322cac7ee5262135a271f3574dc22d9d78c