mirror of
https://github.com/openai/codex.git
synced 2026-09-10 20:26:47 +00:00
## Why A phase-two memory job could release its lease while its consolidation agent was still shutting down, allowing another worker to race the existing agent. ## What changed - Await consolidation-agent shutdown before validating artifacts and completing the job. - Keep the lease until it expires if shutdown fails, and remove the agent from the thread manager only after shutdown succeeds. ## Testing Update startup tests to wait for the phase-two job lifecycle to finish and verify that the consolidation thread has been removed. GitOrigin-RevId: 7ac3a7369529822ac95fd2ee9dcb27d39c191d20