Skip to content
Like what we’re building? Star on GitHub

ADR-184 — A resumed run says why, and reads as one story ​

  • Status: Proposed
  • Date: 2026-12-02
  • Deciders: jo (the direction), Claude (the design)
  • Relates to: ADR-183 (a paused run stays warm) · ADR-106 (a resume restores the scratch banked at teardown)
  • Serves: #4034 · epic #1412

Context ​

After a human answer, the studio shows the run as "Attempt 2 · Current" with "Metrics for this attempt" (studio/src/components/Runs/runView/AttemptPicker.tsx), and nothing says why.

On a Saboteur run in production (01a237d3-025c-77d3-a3c5-100475967d5a, 2026-12-02), the operator accepted an approval and saw three things that nothing on the screen explained:

  • a second attempt;
  • metrics that seemed reset;
  • a minute of silence while the sandbox restarted (57 s, see ADR-183).

The record cannot say why either. store.RunAttempt carries id, started_at, workflow_hash and budget, but no cause. A screen cannot show what its record does not hold, and rebuilding the cause from the order of events would be a guess.

Decision ​

A resumed run says why, and the run reads as one story.

  1. The attempt carries its cause.
    • The producer that opens the attempt writes it into the attempt record, at that moment.
    • The causes: started, resumed_after_answer (with the human node and the interaction), resumed_after_failure, operator_resume, capacity_retry and recovered (a runner was lost).
    • The record also holds the gap it closed: paused at, resumed at, cold or warm.
    • No reader reconstructs a cause from the event stream.
  2. One run, one story by default.
    • The run view totals cost, tokens and duration over every attempt.
    • The per-attempt view stays available as a filter, labelled by its cause: "2 · resumed after your answer on approval, 18:40".
  3. The timeline marks the pause and the resume.
    • The conversation and the event log draw them where they happened.
    • At the pause: "⏸ Waiting for your answer on approval: sandbox saved".
    • At the resume: "▶ Resumed after your answer: new sandbox (57 s)", or "▶ Continued in place" when ADR-183 kept the run warm.
  4. The pause form says what submitting does. It continues the run in place (warm), or resumes it in a new sandbox in about a minute (cold).
  5. The budget says its scope. Wherever a budget is shown, it says whether it applies per attempt or per run.

Options considered ​

  • Hide attempts. Simplest on screen. It loses the execution history that explains a failure after a resume, and the per-attempt budget would then act invisibly. Rejected.
  • Derive the cause in the studio from the event stream. No schema change. But the cause would be rebuilt from an order nothing guarantees, and every other reader (CLI, MCP, the run report) would rebuild it again, differently. Rejected: the fact travels with the attempt.
  • Label only (the cause on the picker, nothing else). Cheap. The run still reads as two pieces, and the minute of restart still looks like a hang.

Consequences ​

  • RunAttempt gains a typed cause and its gap, which changes the contract:
    • the run snapshot, OpenAPI and studio types;
    • the CLI and MCP readers that list attempts.
  • The run view defaults to whole-run totals, and existing per-attempt readers keep working through the filter.
  • A cold resume looks like what it is, a restart with its delay. A warm one (ADR-183) looks like a continuation.
  • Tests:
    • each cause is written by its producer;
    • the default view totals every attempt;
    • the resume marker says cold or warm;
    • the pause form's copy follows the window.