Skip to content

Conversation

@gdaybrice
Copy link
Contributor

@gdaybrice gdaybrice commented Feb 12, 2026

Summary

  • The step execution catch block (step-handler.ts) only handled 410 Gone (completed runs) but not 409 Conflict (cancelled/terminal runs)
  • When a step failed on a cancelled run, the step_retrying event also returned 409, which was uncaught — causing the queue to retry the message indefinitely
  • Fix: handle 409 the same way 410 is already handled — log and return early

Context

Observed in production: a cancelled workflow run (wrun_01KH4WFCWWHVRK9331EX49EMQH) triggered 99+ queue retries in ~18 hours with no sign of stopping.

Queue callback error: Error [WorkflowAPIError]: Cannot step_retrying workflow run wrun_01KH4WFCWWHVRK9331EX49EMQH because it has already finished with status 'cancelled'
    at async default (.next/server/chunks/_381bce51._.js:180:8345)
    at async db.processMessage (.next/server/chunks/_381bce51._.js:173:15814)
    at async db.consume (.next/server/chunks/_381bce51._.js:173:16538) {
  cause: undefined,
  status: 409,
  code: undefined,
  url: 'https://vercel-workflow.com/api/v2/runs/wrun_01KH4WFCWWHVRK9331EX49EMQH/events'
}

The step execution catch block only handled 410 (completed) but not 409
(cancelled/terminal). When a step failed on a cancelled run, the
step_retrying event also returned 409, which was uncaught — causing the
queue to retry the message indefinitely.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: d7f6d47

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/web-shared Patch
workflow Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/world-testing Patch
@workflow/nuxt Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Feb 12, 2026

@gdaybrice is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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