Files
orca/src/shared
Brennan Benson e6c298e8a9 fix(native-chat): a Stop Codex took settles the message whose turn never opened (follow-up to #25217) (#26105)
* fix(native-chat): a Stop the agent took settles the message whose turn never opened

When Codex takes a person's Stop on a turn it never opened, no turn-ended
event follows, so the message stayed pending: the chat read Working with
Stop shown, and the next turn's clock counted from that message.

The Stop's settle now handles that case from its own answer: when the
provider names the turn it took and that turn has no record, the sends it
was for are withdrawn by the same rule a Codex child's end after a Stop
already uses. The send's own row then says it was stopped before the agent
started, and Working, the clock and the opening-send hold follow from it
being settled.

Deletes the opening-send hold's special case for a taken Stop's note, which
this makes dead, and moves the Stop note key back next to its only users.

* test(native-chat): a Claude Stop before the echo settles the send through the CLI's end, and the next message goes out

* fix(native-chat): an interrupted Codex turn that never started records nothing, and the withdrawal reads from the handover

Codex can abort a turn before it starts: it answers the interrupt, then
sends turn/completed for a turn that never sent turn/started. The
translator wrote an empty interrupted turn for it, so the person saw that
turn beside the message's own "Stopped before the agent started" row, and
when the end was read before the interrupt's answer the Stop's settle
found a record and withdrew nothing. Codex records a turn's prompt only
once the turn starts, so an interrupted turn this child never started,
with no item or prompt read, now gets no record. Failed ends keep theirs.

The withdrawal now asks whether a turn opened since the send's handover
row, the same point the opening-send hold reads, rather than since its
acceptance: a turn record written in between is not the send's turn.

* test(native-chat): say why the item-read case pins only that the send is not taken back
2026-10-07 01:25:50 -07:00
..
2026-09-03 17:32:59 -07:00