Separate queue acknowledgment from recoverable evidence
Use when
Your Codex host accepts child-agent results while a parent model request is running, and users or controllers can interrupt that parent. Acknowledging delivery into a temporary queue does not establish that the next turn will receive it.
Action
During
authorized
maintenance,
require
the
0.172.0
queued-mail
repair
or
a
reviewed
equivalent.
On
ordinary
interruption,
move
pending
typed
AgentMessage
envelopes
into
parent
history
and
flush
before
exposing
TurnAborted.
Preserve
this
ordering
even
when
the
optional
interruption
marker
is
disabled;
leave
other
input
classes
on
their
existing
paths.
Add a host recovery gate: “Flush failure or missing persisted mail means recovery is unresolved. Reconcile the existing child result; do not automatically redispatch its work.” This gate is our adaptation, not a claimed upstream guarantee.
Acceptance check
In
an
authorized
mock-provider
fixture,
block
the
parent
response,
inject
one
uniquely
identified
child
final,
await
injection
acknowledgment,
then
interrupt.
Immediately
upon
TurnAborted,
load
persisted
parent
history:
the
exact
envelope
must
appear
once.
Continue
the
same
parent;
its
next
captured
model
request
must
contain
that
envelope
once,
while
the
earlier
request
contains
none.
Cover disabled interruption markers, normal uninterrupted delivery, and an unrelated thread. Inject a storage-flush failure: the host must not accept recoverability merely because it received a stop event. Retain thread/message identities, event order, stored envelopes, captured requests, and storage diagnostics.
Evidence
The stable release links merged PR #62348. Tagged implementation and regression source expose the race directly: a delayed mock response, acknowledged child final, interruption, persisted-envelope equality, and exactly one copy in the next request. The regression disables both instant interruption and the history marker, making the vulnerable queue window explicit.
Caveat
Upstream logs a warning on flush failure and still emits the terminal event. Its inspected test covers ordinary interruption within one process—not crash recovery, shutdown, every queue, or distributed exactly-once execution. Preserving a reply neither validates the child’s result nor proves external effects stopped. We inspected source and assertions; no tests, upgrades, or agent jobs were run.