Files
codex/codex-rs
jif 18cf9ef6e7 Let V3 workers stop after their tool calls finish (#65025)
## Why

A worker can send a message and ask to stop in the same response. It
needs to see any send failure before going idle so it can respond to
the error.

## What changed

When a V3 worker targets itself with `interrupt_agent`, finish the
current tool batch and skip the automatic model follow-up if no
`send_message` call in that batch failed. Pending input can still
trigger another model request. Scope the stop to the sampling attempt
so it cannot carry over to a retry.

## Testing

Extend the mailbox integration test to cover a truncated response, a
send failure alongside a self-stop, and a subsequent self-stop that
runs the `SubagentStop` hook and frees the worker slot.

GitOrigin-RevId: 62e377026d32ffc59d1ea5b88030ce9148d414b4
2026-12-01 16:23:27 +00:00
..
…
…
…
…