Skip to content

chat: once its fix is in, the agent offers to resume the failed run - #72

Merged
endrix merged 1 commit into
mainfrom
feat/agent-resumes-fixed-run
Oct 2, 2026
Merged

endrix merged 1 commit into
mainfrom
feat/agent-resumes-fixed-run

Conversation

@endrix

@endrix endrix commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Follow-up to #71 (Fix with AI).

  • The fix task's prompt tells the agent, when the runtime can resume (cliResumeArgs), to call the new resume_failed_run chat tool once its fix is applied.
  • The tool runs the driver's <runWorkflow>.resumeFailed command, which asks the person Resume / Not now. On Resume, it reruns from the failed run's directory at its last completed step (resumeStepFor with atLastStep), so what ran before is replayed rather than run again. The tool returns a text result the agent can relay.
  • The driver remembers the last failed run per workflow file and forgets it once that workflow runs clean. When called from a nested workflow's chat session, it falls back to the most recent failure.
  • The tool is only registered when the profile has cliResumeArgs.

Tests: resume-failed-run.test.ts covers resume, decline, the nested-file fallback, clearing after a clean run, a runtime without resume, and the tool handler. The prompt assertions and the registered-command count are updated.

https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU

The fix task now tells the agent, when the runtime can resume, to call the
`resume_failed_run` chat tool once its fix is applied. The tool asks the
person (Resume / Not now) and, on Resume, reruns the workflow from the failed
run's directory at its last completed step -- where it failed -- so what ran
before is replayed from the journal rather than run again.

The driver remembers the last failed run per workflow file (forgotten once
that workflow runs clean); the tool falls back to the last failure, so a chat
session opened on a nested workflow's file still finds it.

Claude-Session: https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU
@endrix
endrix merged commit 67d3e4a into main Oct 2, 2026
1 check passed
@endrix
endrix deleted the feat/agent-resumes-fixed-run branch October 2, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant