Files
codex/codex-rs
Eddie Chen f1dd04959c Preserve turn attribution when queued mail wakes durable sleep (#51419)
## Why

Queue-only agent mail can wake a sleeping session without starting a new task. The wake turn needs to retain the previous turn's attribution so delegated work reports completion to the initiating agent, including after a reload.

## What changed

Capture the previous turn's attribution while reserving the pending-work turn. Reuse its trigger, parent and root turn IDs, and initiating agent path for queue-only wakes. Mail that explicitly starts a new task continues to supply its own attribution.

## Testing

Extend regression coverage for live and reloaded sleep wakes, delegated and unknown attribution, settings changes while asleep, and subsequent task-triggering mail. Verify that a reloaded sleeping worker routes completion to the initiating turn.

GitOrigin-RevId: 28e38474028bdbf35a0538c1202165f056bb3dc3
2026-10-06 17:09:56 +00:00
..
…
…
…