Files
codex/codex-rs
alishobeiri-oai 8c076942cb Allow agent messages to wake idle root sessions behind a feature flag (#54961)
## Why

A worker can finish after its parent has returned a final answer. Agent messages without `trigger_turn` previously needed an outstanding durable sleep to wake an idle session.

## What changed

Add the disabled-by-default `wake_on_agent_messages` feature to start a new root turn when agent mail arrives through direct delivery or the host mailbox. Reuse the previous turn context for messages without `trigger_turn`. Keep these automatic wakes disabled for interrupted sessions, Plan mode, and child agents.

## Testing

Add coverage for both delivery paths waking a completed root exactly once, child completion waking a parent after its final answer, and the interruption, Plan mode, and child-agent boundaries.

GitOrigin-RevId: f1a4fc7c22be8ca46b2173a85445126cbdd6c4b6
2026-10-18 01:58:02 +00:00
..
…
…