mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
## Why Listing root threads for chat and task analytics can trigger filesystem scans and metadata repair. The state database can serve these lists without that work. ## What changed Start root thread pagination with `thread/list` and `useStateDbOnly` enabled. If the server returns JSON-RPC error `-32603`, discard the partial results and restart from the first page with filesystem repair enabled. SQLite cursors may identify different pages in the filesystem listing. ## Testing The chat analytics regression test simulates an error on the second indexed page and checks that the fallback restarts pagination, excludes discarded results, and preserves the usage estimate budget. The task analytics test checks that only root listings use the database-only mode. GitOrigin-RevId: 9de78a9eca4662df06d22a86cffb6e7bcba428cb