Skip to content

feat(engine): retry a failed, timed-out or stopped workflow run - #4428

Open
LHagfoss wants to merge 3 commits into
mainfrom
feat/engine-workflow-retry
Open

LHagfoss wants to merge 3 commits into
mainfrom
feat/engine-workflow-retry

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

A workflow run that ended failed, timed_out or cancelled could not be continued; retrying meant a new run that re-paid every worker that had already succeeded. The run's replay cache already answers finished calls, so a retry now reuses it.

  • Engine: run_workflow takes retry_run_id (no script/name/args); retry_in sets the settled run back to running (clears error/result/finished time and the wake claim, lowers limits if asked) and drives it from its saved script through the existing resume_one. done and running runs are refused.
  • ACP: _rustcode/workflows/retry, routed through the asking app like Resume (fix(engine): resume a workflow run through the app that asked #4413).
  • Desktop: Retry on the run card for failed, timed-out and stopped runs (retryWorkflow, canRetry), and the mock answers it.
  • docs/workflows.md: Retrying a run.

Changelog

Workflow runs that failed, timed out or were stopped can be retried from their card; finished workers are kept and only the failed ones run again.

Testing

bun run check in apps/desktop (3340 pass), cargo fmt --check, scripts/check-comments.py, scripts/check-rust-size.py locally; engine unit tests for retry, refusals and validation run in CI.

Closes #4383

@github-actions github-actions Bot added the feature New feature or request label Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(engine): retry a failed, timed-out or stopped workflow run

2 participants