The error said the model returned empty content. I assumed the response stream had broken. It hadn't.

What I Was Chasing (Wrong Direction)

My multi-agent content pipeline hit a wall: one of the generation steps was throwing "model returned empty content" and the whole run was aborting. The message pointed at the output layer, so I started there.

I spent a few rounds instrumenting the streaming path — checking whether the SSE connection was dropping mid-response, whether the provider was rate-limiting and silently closing the socket, whether my deserialization was eating bytes. The logs looked clean every time. Request went out, response came back, full round-trip, no timeout. The only thing missing was actual content in the assistant turn.

I then suspected a provider-side issue: maybe the endpoint was returning a malformed chunk that my client was silently discarding. I added more logging at the HTTP layer. Still nothing. The request was completing successfully. finish_reason: "length". Zero tokens in the content field.