Files
codex/codex-rs/history
Zahan Malkani ad5dd4a110 Persist realtime handoffs before accepting turn input (#62288)
## Why

Realtime history needs to record which transcript frames reached the
coding agent and which turn received them. If a handoff fails or the
conversation reconnects, Codex needs to distinguish speech that was
already used from speech that is still available for the next input.

## What changed

- Route handoffs through normal turn admission to start or steer a turn.
  When realtime frame history is enabled, persist the transcript frames
  and the receiving turn's input before publishing acceptance or exposing
  the input to the model. Attribute only transcript frames represented
  in the rendered input.
- Reserve transcript frames across overlapping handoffs and release them
  on definite rejection. Retry an uncertain write with the same input
  and require history recovery if the write still cannot be confirmed.
- On V3 reconnect, restore persisted speech that has not been consumed
  and put it before newly captured speech.

## Testing

Add regression tests for attribution after transcript truncation,
overlapping handoffs, V3 reconnect ordering, and preservation of typed
input when a handoff in the same turn fails before model sampling.

GitOrigin-RevId: 432dd51971f7ced20344ebc7f0c7b007bb849f54
2026-11-18 14:26:53 +00:00
..