feat: per-workflow timeout + run-level error in execution log#268
Merged
Conversation
Add a workflow-level timeout configured in the Properties panel (default 0 = disabled). When a run exceeds the limit it is stopped at the next node boundary and recorded as a failed run with a 'timed out' error. Enforced cooperatively via a deadline checked in WorkflowExecutor.check_cancelled, so it applies to manual (streaming), API, and triggered runs. Long Wait nodes sleep in slices so they are interrupted promptly. Also note in the properties panel that the error workflow is not triggered on manual test runs. Co-Authored-By: Claude Opus 4.8 <[email protected]>
When a run fails without per-node results (such as a workflow timeout), the Execution Log showed only an ERROR header with an empty body. Surface the run-level error message in the log empty state. Co-Authored-By: Claude Opus 4.8 <[email protected]>
A failed run with an empty final node_results (e.g. a workflow timeout) was wiping the node rows already streamed during the run. Preserve the accumulated node results when the completion event carries none, and render the run-level error as a banner above the node history instead of replacing it. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0= disabled). When a run exceeds the limit it is stopped at the next node boundary and recorded as a failed run with a "timed out" error.WorkflowExecutor.check_cancelled, so it applies to manual (streaming), API, and triggered runs.WorkflowTimeoutErrorsubclassesWorkflowCancelledErrorso existing unwind/retry handling is reused.Changes
workflows.workflow_timeout_secondscolumn + migration089_workflow_timeout.timeout_secondsintoexecute_workflowandexecute_workflow_streaming; streaming endpoint converts a timeout into a failedexecution_complete.Workflowtype,workflowApi.update, Properties panel input, DebugPanel run-level error display.features.md.Test Plan
tests/test_workflow_timeout.py): deadline check, disabled timeout, and a 3s wait + 1s timeout returning an error result in <2.5s.timeout_seconds/_arm_deadlineinterface; full./check.shgreen (1 known-flaky chart test passes in isolation).e2e/workflow-timeout.spec.ts): 3s wait + 1s timeout fails the run and the "timed out" error shows in the canvas execution log.🤖 Generated with Claude Code