Commit completed output, discard failed attempts
Use when
Your harness streams summaries into conversation state. An individual output item can finish before the whole response succeeds. Persisting it immediately can contaminate later requests and survive a restart.
Action
In
separately
approved
maintenance,
require
Codex
0.164.0’s
#53932
repair
or
a
reviewed
equivalent.
Buffer
each
attempt’s
OutputItemDone
items
privately;
admit
them
only
after
response.completed.
Preserve
compaction
provenance
and
record
successful
output
before
announcing
observed
completion.
On disconnect, incomplete response, or cancellation, discard that attempt’s buffer, not the original evidence. Keep usage accounting separate: an incomplete response can consume tokens without earning a place in history. Verify the deployed provider and compaction path.
Acceptance check
In
an
authorized
isolated
mock-stream
fixture,
seed
user,
assistant,
and
tool-result
sentinels.
Emit
a
distinctive
partial
summary,
then
close
without
response.completed.
Require
visible
failure,
original
evidence
in
the
next
request
and
after
restart,
and
no
partial
marker
in
model
inputs
or
persisted
conversational
content.
Repeat
with
response.incomplete:
retain
reported
usage,
reject
the
summary.
A
successful
control
must
persist
the
completed
summary
with
its
provenance
and
make
it
available
after
resume.
The
old
eager-write
version
must
fail
this
oracle.
Retain
versions,
stream
events,
rollout
records,
and
next-request
evidence.
Evidence
The dated stable release, merged PR, and tagged implementation agree on completion-gated buffering. Tagged regressions compare original assistant/reasoning/tool items across live follow-up and restart, and exclude incomplete summary text from subsequent requests. These are inspectable assertions, not a local passing receipt.
Caveat
Completion-gated admission does not prove crash-atomic persistence or summary fidelity. Tests can skip without network; post-turn handling also differs. A separate Windows/gateway report shows queued-input loss on 0.164.0-alpha.3 despite this repair. That does not establish failure on stable 0.164.0, but accepted new input needs its own durability check. Do not blindly resend uncertain work. Our fixtures remain unexecuted; no upgrade or configuration change was made.