Files
codex/codex-rs
Felipe Coury e29eceb751 Preserve streamed answers when subagents finish (#46867)
## Why

Subagent activity can arrive while the parent answer is still streaming. Rendering it immediately flushes the answer stream before the authoritative message completes.

## What changed

- Defer subagent activity until the answer stream finishes, preserving one complete answer before the activity row.
- Drain queued lifecycle activity when a turn ends without opening queued prompts.
- Show late subagent activity after the turn stops even when unresolved prompts remain queued.

## Testing

Add regression coverage for completion before or between answer deltas, a missing final delta, interrupted and failed turns, and late activity with queued questions. Extend dynamic activity coverage to verify that turn finalization leaves queued prompts unopened.

GitOrigin-RevId: f0577b9ac47cf652c7c75b3aace38c10dccada18
2026-09-20 18:26:57 +00:00
..
…
…