A turn can receive bytes for 57 minutes and produce nothing — instrument per-request chunks, bytes and tokens so "generating slowly" is distinguishable from "receiving nothing useful" #280
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/wi-019fb9d7-a-turn-can-receive-bytes-for-57-minutes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Anima work item
019fb9d7-395c-74b0-8f91-7bfcef1bf03b.What happened
Session
019fb977-d7ff-70f3-b89f-d15f18566c65, workspacetecton, WI-259,on image
0fc0416b257d(post-#279):The agent had understood its task correctly — it read the review verdict and
enumerated the 15-file blast radius back accurately. It then produced 1423
characters in 57 minutes and nothing durable.
Why the existing signals cannot explain it
Both supervision mechanisms stayed silent, and each silence is informative:
grep -c "chat turn stalled"= 0. #279'sheartbeat did its job — this is no longer a false kill.
AKH_SOCKET_READ_TIMEOUT_SECS, default 60s): neverfired. So bytes were arriving on the socket at least every 60 seconds for
the entire hour. The connection was alive and the provider was delivering.
So this is neither a hang nor a dead socket. Something was being received,
continuously, and almost none of it became work. We currently have no way to say
what. Until #279 landed, the watchdog killed these turns at 2700s and mislabelled
them
empty, so the question could not even be asked.What to instrument
Per LLM request, at completion (and on cancellation), one structured log line:
chunks_received,bytes_receivedchunks (a chunk that yielded no visible event)
prompt_eval_count/eval_countfrom Ollama's final message, and wall durationrequest_seqwithin the turn, so a turn that issues 40 requests isdistinguishable from one that issues a single 57-minute request
That single line separates the live hypotheses, which today we cannot choose
between:
eval_count, steady byteseval_counteachthinkingdeltas dominate,contentandtool_callsnear zero (notereasoning_effort = "high"is set on tecton andthe model advertises a 1,000,000-token context window)
Also worth capturing
brief may be producing pathological latency; right now nobody can see the input
size at all.
the interesting turns are the ones that get killed.
Acceptance
both the completed and cancelled paths.
hypotheses holds.
request, not per chunk).
Context
Related: WI-271 (the heartbeat, merged as #279) — this item exists because that
fix worked and stopped hiding the problem. Do not re-litigate the watchdog here.
WIP: A turn can receive bytes for 57 minutes and produce nothing — instrument per-request chunks, bytes and tokens so "generating slowly" is distinguishable from "receiving nothing useful"to A turn can receive bytes for 57 minutes and produce nothing — instrument per-request chunks, bytes and tokens so "generating slowly" is distinguishable from "receiving nothing useful"