mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why The local code-mode host could stay running after its last session closed. A short grace period allows nearby sessions to reuse the same process while releasing it after sustained inactivity. ## What changed Keep the host active while session leases or operation RPCs are in flight. Once they drain, start a five-second idle timer. New activity cancels retirement and starts a fresh grace period when it drains. Process metrics only sample an existing host and leave the idle timer untouched. Opening a session after retirement starts a fresh host. ## Testing Add a lifecycle test that covers overlapping sessions, reuse during the grace period, retirement despite metrics polling, and startup on the next session. GitOrigin-RevId: 2ebf7f7b3b3bf2d5a602b0e5b9085195eee13446