Files
codex/codex-rs/protocol
jif 9f02599a9a Add stop_agent for multi-agent V3 (#65061)
## Why

When a worker's current turn is no longer needed, the caller needs to
know when that turn has released its execution slot. Previously,
`interrupt_agent` returned without waiting for the slot to be released.

## What changed

Replace `interrupt_agent` with `stop_agent` in V3. When stopping a loaded
worker, the tool waits for the interrupted turn to release its slot.
A message can resume the worker, and queued input can reclaim the slot
immediately.

Workers can target their own path to stop after the current tool batch
if no new input is waiting and no send failed.

## Testing

Extend the V3 mailbox test to cover self-stop freeing the only worker
slot, a message waking another worker, and the parent stopping that
worker and observing its interrupted status.

GitOrigin-RevId: b066d10e4221fabe49b07ed126752e2e88e9517b
2026-12-01 19:16:25 +00:00
..
…

codex-protocol

This crate defines the "types" for the protocol used by Codex CLI, which includes both "internal types" for communication between codex-core and codex-tui, as well as "external types" used with codex app-server.

This crate should have minimal dependencies.

Ideally, we should avoid "material business logic" in this crate, as we can always introduce Ext-style traits to add functionality to types in other crates.