classifyMainLoopStop maps a non-error, non-completed main-loop stop to an item failure class and a safe reason. Only the configured max-tool-request budget is a declared budget stop; the empty-round and compression exits are genuine but unclassifiable, so they map to the honest unknown catch-all. On
(stop llmloop.MainLoopStop)
| 1013 | // unclassifiable, so they map to the honest unknown catch-all. Only an explicit |
| 1014 | // budget trigger may use the budget classification. |
| 1015 | func classifyMainLoopStop(stop llmloop.MainLoopStop) (session.FailureClass, string) { |
| 1016 | switch stop { |
| 1017 | case llmloop.StopMaxRounds: |
| 1018 | return session.FailureBudget, "reached the maximum tool-request rounds without finishing" |
| 1019 | default: // StopEmptyRounds, StopCompression, StopNone |
| 1020 | return session.FailureUnknown, "main task stopped before completing" |
| 1021 | } |
| 1022 | } |
| 1023 | |
| 1024 | // subtaskStop is the structured, non-error reason a single-file review stopped |
| 1025 | // short of task_done. It lets the dispatcher classify manifest coverage from an |