Concept · Stop reasons

    Every run should end with an answer.

    MartinLoop records why a coding-agent run ended instead of letting it disappear into an ambiguous terminal state. A stop reason tells you whether the run succeeded, hit a budget boundary, was blocked by policy, or ended in an error.

    The four reasons below are the shipped taxonomy. Individual failure classes (like no_progress or environment_mismatch) live inside the 13-class failure atlas and are attached to policy and error stops.

    success

    What triggers it. The verifier command passed on the current iteration. This is tied to your --verify command (tests, typecheck, lint). A run is only marked done when the verifier reports pass.

    In the run history. Row on /dashboard/runs shows stop reason "success" (teal). Cost stops accruing.

    In the receipt. The receipt closes with stop_reason: "success" and the final verifier evidence attached to the last iteration.

    budget

    What triggers it. The run reached the hard USD ceiling set with --budget before the verifier passed. The loop is cut cleanly — the agent does not silently keep spending.

    In the run history. Row on /dashboard/runs shows stop reason "budget" (amber). Total cost equals the ceiling within a rounding step.

    In the receipt. The receipt closes with stop_reason: "budget" and the per-iteration cost trail so you can see where the run drifted.

    policy

    What triggers it. A stop rule fired: no-progress, scope-creep, safety leash blocked, or another policy configured for the run. The agent stopped because it was violating the loop contract, not because it hit an exception.

    In the run history. Row on /dashboard/runs shows stop reason "policy". Hover reveals which stop rule fired.

    In the receipt. The receipt closes with stop_reason: "policy" and the failure class from the 13-class atlas (e.g. no_progress, scope_creep, safety_leash_blocked).

    error

    What triggers it. An unrecoverable error was raised inside the loop — an environment mismatch, a tool crash, a hallucination that broke the run contract. The run is aborted rather than silently continued.

    In the run history. Row on /dashboard/runs shows stop reason "error" (red). Failure class is attached.

    In the receipt. The receipt closes with stop_reason: "error" and a failure class such as environment_mismatch, verification_failure, or repo_grounding_failure.

    Inspect a stop reason locally

    martin dossier --latest                 # list local receipts
    martin dossier <loop-id>       # print one receipt (stop_reason at the end)
    martin dossier <loop-id> --json | jq .stop_reason

    Related: Software receipts · Verification · Failure atlas · Run history