Files
codex/codex-rs
Anton Panasenko b75ec48a2c Preserve active recovery turns when clients reconnect (#61014)
## Why

A recovery turn can occupy the core turn slot before `TurnStarted` is published and thread statuses reflect it. During this window, `thread/resume` with configuration overrides could treat an unsubscribed thread as idle and shut it down, interrupting recovery.

## What changed

Require the core turn slot to be empty before replacing a loaded thread during resume. Expose `CodexThread::has_active_turn()` and reuse it in the residency unload check.

## Testing

Add a regression test that blocks paginated history writes to hold a recovery turn before status publication, reconnects with a configuration override, and verifies that the client receives completion for the preserved recovery turn.

GitOrigin-RevId: f295038c8502a9b2849ddc08614db4a3cb5610cf
2026-11-12 04:17:58 +00:00
..
…
…
…