# Type Alias AgentStopReason

AgentStopReason: "agent-stopped" | "turn-budget" | "tool-error" | "cancelled"

Why the agent loop stopped.

- `agent-stopped`: model emitted no further tool calls — natural end
- `turn-budget`: hit `turnBudget` before the model finished
- `tool-error`: `onToolCall` threw; harness's responsibility to grade
- `cancelled`: external `AbortSignal` fired

- Defined in packages/nexus-agents/src/agents/agentic/types.ts:72