mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
## Why Cancelling a session after persistence opens but while MCP startup is still pending can leave its writer held, blocking a subsequent resume. ## What changed Create `LiveThreadInitGuard` inside the persistence startup future so it protects the live thread while `tokio::join!` waits for other startup work. Dropping the startup future then schedules writer cleanup. ## Testing Add a regression test that cancels a resume while MCP startup is blocked, verifies the local writer is released, and resumes the same thread successfully. GitOrigin-RevId: 57d8624e783a7b993579a6386aea35ba845da0e3