pub fn classify(
exit_code: Option<i32>,
signal: Option<i32>,
stderr: &str,
result_frame: Option<&Value>,
) -> AgentFailureExpand description
Classify an agent run failure.
exit_code / signal come from the child’s ExitStatus. stderr
is the captured (capped) child stderr. result_frame is the
terminal stream-json result object when one was seen — the CLI
sometimes reports an error there while still exiting 0, so it is
folded into the evidence.