Files
magpie/docs
ggbdpq eb7e72cc7f gateway: a response.completed with no output and no tokens fails over (#2471)
What changed: a Responses upstream that ends its 200 stream with a
response.completed carrying no output and counting no token - WorkBuddy
AI's account answered Codex's request with created, in_progress,
completed and `output: []` three times running (MurmuredVelpro) - had
the completed event taken for a reply's end: the held stream went to the
agent as a completed turn, the try stood as a 200 success, and the
group's healthy members were never asked. streamEvent now reads a
completed with an empty output and a zero usage as the no reply it is -
the same shape a translated reply that said nothing and counted nothing
has failed as since #2086 (repliesCounted) - and fails the held try for
the group's next candidate, in the candidate walk as an empty reply's
does: nobody rests, as the reply's shape failed, not the account. A
completed that counted a token stays a reply, as Claude's own empty
end_turn does; and an event this reaches is one nothing was said before,
since the hold lets the first content through and reads no event beside
it, so nothing of the try has reached the agent when it fires.

The fields said are what is read: a completed that names neither field
goes as it came, as the streamEvent table pinned it
(TestStreamEventRefusals, which caught the first draft reading an
omitted output as an empty one), and a completed that counted a token
stays a reply.

Run: TestEmptyCompletedFailsOver (new) red on 06c2c35d1 before the fix -
one try, status 200, Fail empty, the second member never asked, the
reported ledger shape byte for byte - green after, with
TestEmptyCompletedLeavesAWholeReplyAlone (new: a completed with output
and usage goes as it came) and TestFinishReasonErrorFailsOver green.
Not tried: a real WorkBuddy AI account (the stream is built from the
frames the reporter pasted).

Generated-by: GLM-5.3-Flash (ZCode)
2026-11-01 16:43:16 +08:00
..