fix: default empty agentloop status to blocked in InProcessRunner

This commit is contained in:
sam committed 2026-07-22 05:44:27 +10:00
1 parent edd05aea6b
commit 720b95b57a
1 file changed
+7
+7
View File
@@ -79,6 +79,13 @@ func (r *InProcessRunner) Run(ctx context.Context, workspace string, req Request
AppendedNotes: notes.appended,
Captures: captures,
}
// agentloop may return a zero-valued status on early exit (model
// connectivity failure, empty response, etc.). Normalise it to a
// known value so protocol validation always passes.
if result.Status == "" {
result.Status = "blocked"
result.Detail = "agent returned no status (possible model connectivity issue)"
}
if cause := context.Cause(ctx); cause != nil {
return result, cause
}