mirror of
https://github.com/openai/codex.git
synced 2026-10-19 16:17:49 +00:00
## Why Session index updates perform synchronous file I/O and wait on a blocking mutex inside async functions, blocking runtime threads. ## What changed Run appends and thread-name removals in `spawn_blocking` workers. Acquire a Tokio mutex before dispatch and keep its owned guard in the worker so queued and running updates remain serialized even if the awaiting task is cancelled. Move the lookup's file-existence check into its blocking worker as well. ## Testing Add tests for lock retention after cancellation of running and queued updates, write ordering after cancellation, and removal that preserves other thread names and malformed lines. GitOrigin-RevId: 368745d8e5bbf24c527facc0a62ddd0fb76f0ffb