Problem
When a run ends abnormally, the result payload carries no machine-readable cause. Operators are left doing forensic fingerprinting — e.g. inferring "launch stall" from n_messages == 0 && elapsed ≈ watchdog timeout, or diffing timestamps to separate "gateway rejected the request" from "agent deadlocked internally" from "model stopped making progress".
In batch usage this is the single largest operational cost: for one incident class, roughly half of the debugging time went into merely classifying failures before any actual fixing could start.
Proposal
Every terminated run should emit a structured termination record in the result artifact itself (not only in logs), e.g.:
{
"finish_reason": "llm_call_timeout",
"detail": { "last_error": "...", "http_status": 429, "turn": 17 }
}
Suggested enum, minimally:
Design notes:
Problem
When a run ends abnormally, the result payload carries no machine-readable cause. Operators are left doing forensic fingerprinting — e.g. inferring "launch stall" from
n_messages == 0 && elapsed ≈ watchdog timeout, or diffing timestamps to separate "gateway rejected the request" from "agent deadlocked internally" from "model stopped making progress".In batch usage this is the single largest operational cost: for one incident class, roughly half of the debugging time went into merely classifying failures before any actual fixing could start.
Proposal
Every terminated run should emit a structured termination record in the result artifact itself (not only in logs), e.g.:
{ "finish_reason": "llm_call_timeout", "detail": { "last_error": "...", "http_status": 429, "turn": 17 } }Suggested enum, minimally:
completed— normal finishmax_turns/budget_exhaustedcontext_limit_salvaged— see bug: context-limit salvage silently promotes think fragments into final_answer; think-tag misalignment on backends without a reasoning parser #152llm_call_timeoutvsbackend_error(code)— these two being distinguishable is the core askno_progress— loop-break / degeneration interventionsaborted— external killDesign notes: