mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Thread name resolution performs a separate SQLite metadata lookup for each thread. Batch these reads to reduce database queries for large result sets. ## What changed Add `StateRuntime::get_threads` and use it in `resolve_thread_names`. Fetch metadata in batches of at most 999 IDs to stay within SQLite's bind limit, skipping missing or invalid records independently so valid metadata remains available. ## Testing Add regression coverage for reads spanning multiple batches, invalid and missing records, duplicate IDs, and empty input. GitOrigin-RevId: a403416f1da5adea56705c70839850760d3eb550