feat(runs): stopped and failed runs can be resumed; Abandon becomes Stop; redo confirmation redesign (#51) #53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "stop-and-resume-runs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #51 (closed after the OpenSpec change is archived). OpenSpec change:
openspec/changes/stop-and-resume-runs.Why
Stopping (abandoning) a run cancelled every step after the one it interrupted, and nothing ever put them back. A redo already re-opened the run and restarted its opencode server, so the redone step ran, and then the run dead-ended on the wall of cancelled steps.
What changed
POST /api/runs/{id}/stopadded;/abandonkept. The stored status and event keep their names, so recorded runs replay unchanged.POST /api/runs/{id}/resume: re-opens a stopped or failed run and returns to pending what the stop ended (and, for a failed run, failed and unreachable steps). Each runs as a new attempt from its entry checkpoint; succeeded steps stay. Refuses succeeded, live, archived and reclaimed runs with a reason.Verification
test_abandon.py, scheduler re-open tests intest_liveness.py).tsc -b, 381 vitest tests,vite buildclean.follow-the-tail, which needs a live osfd and fails identically on main.🤖 Generated with Claude Code
Stopping a run cancelled every step after the one it interrupted and nothing put them back, so a redo re-opened the run and then dead-ended one step later. Resume (a header button, a ledger action and POST /api/runs/{id}/resume) re-opens a stopped or failed run and returns to pending what the stop or the failure ended; each runs again as a new attempt from its entry checkpoint, and what succeeded stays. A redo on a stopped run does the same, so the run carries on past the redone step. "Abandon run" is "Stop run" (POST /stop; /abandon kept), stored as before. The redo confirmation answers what happens, what it undoes and what it cannot undo, in one type style, leaving out empty sections and putting the mechanism behind ⓘ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>