Skip to content

[agent][inference] Base inference stream stalls mid-generation, no keepalive/recovery → orphaned turn + empty reply #4761

Description

@M3gA-Mind

Base inference stream stalls mid-generation with no keepalive/timeout recovery → orphaned turn, empty reply (no terminal event)

Evidence

g7-29 "Explain, with full reasoning visible, how you'd triage an inbound Telegram message" (pure reasoning, no tools, no sub-agents):

  • events: ready, inference_start, iteration_start, 192 text_delta, 2 inference_heartbeat. First token @19s (poor TTFT).
  • streamed 826 chars of coherent step-by-step reasoning, then FROZE mid-sentence ("…urgent, asap, help, can you"), emitted only heartbeats, and the server dropped the stream at 250.9s with NO chat_done and NO chat_error → empty final reply.

Ask

This is a DISTINCT root cause from the sub-agent reduce-hang (no sub-agent here) and from turn-interference — the base inference stream itself stalls and the turn is orphaned with no terminal event. Add mid-stream keepalive / idle-timeout recovery on the core↔backend inference connection, and ensure a terminal event (chat_done or chat_error) always fires when the upstream stream stalls/drops. Also investigate the ~19s TTFT. (Some upstream slowness on staging is infra, but the missing recovery + missing terminal event is a code gap.) Core inference streaming path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions