惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Commits to openclaw:main
Recent Commits to openclaw:main
U
Unit 42
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
博客园 - Franky
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Palo Alto Networks Blog
NISL@THU
NISL@THU
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
C
Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Spread Privacy
Spread Privacy
小众软件
小众软件
T
Threat Research - Cisco Blogs
Project Zero
Project Zero
博客园 - 三生石上(FineUI控件)
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Register - Security
The Register - Security
The Hacker News
The Hacker News
F
Fortinet All Blogs
Security Latest
Security Latest
Cisco Talos Blog
Cisco Talos Blog
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
T
The Exploit Database - CXSecurity.com
量子位
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Proofpoint News Feed
G
GRAHAM CLULEY
D
DataBreaches.Net
P
Privacy International News Feed
Y
Y Combinator Blog
Simon Willison's Weblog
Simon Willison's Weblog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
P
Proofpoint News Feed

Workflow SDK Documentation

Patterns for Defining Tools Human-in-the-Loop Building Durable AI Agents Queueing User Messages Resumable Streams Sleep, Suspense, and Scheduling Streaming Updates from Tools API Reference Workflow Globals Changelog Resilient run start Cookbook Building a World Deploying Astro Express Fastify Hono Getting Started NestJS Next.js Nitro Nuxt Python SvelteKit Vite fetch-in-workflow hook-conflict Errors node-js-module-in-workflow serialization-failed start-invalid-workflow-function step-not-registered timeout-in-workflow webhook-invalid-respond-with-value webhook-response-not-sent workflow-not-registered Errors & Retrying Hooks & Webhooks Idempotency Foundations Serialization Starting Workflows Streaming Versioning Workflows and Steps How the Directives Work Encryption Event Sourcing Framework Integrations Understanding Directives Migration Guides Migrating from AWS Step Functions Migrating from Inngest Migrating from Temporal Observability Testing Server-Based Testing createHook createWebhook defineHook FatalError fetch getStepMetadata getWorkflowMetadata getWritable workflow RetryableError sleep @workflow/vitest DurableAgent @workflow/ai WorkflowChatTransport getHookByToken getRun getWorld workflow/api resumeHook resumeWebhook Chat Session Modeling runtime-decryption-failed Upgrading Workflows abort-signal-timeout-in-workflow Cancellation How Cancellation Works Internal Serializable AbortController and AbortSignal Eager Processing of Steps & Incremental Event Replay TanStack Start Agent Cancellation Sequential & Parallel Execution Workflow Composition Local World | Workflow SDK Postgres World | Workflow SDK Vercel World | Workflow SDK Migrating from trigger.dev Secure Credential Handling Local World | Workflow SDK Postgres World | Workflow SDK Vercel World | Workflow SDK
corrupted-event-log
2026-05-31 · via Workflow SDK Documentation

The workflow's event log contains an event that no consumer can process, indicating corruption or invalid state.

This error occurs when the Workflow runtime repeatedly cannot replay events in the event log. This usually means the event log is in an invalid state, such as duplicate or orphaned events, or that a runtime determinism bug persists across retry attempts.

This is a workflow-level fatal error. It cannot be caught or handled inside your workflow code. The runtime first retries transient replay divergence automatically; it marks the run as failed with this error only after replay still cannot recover.

Workflow replay diverged <divergenceCount> times after <maxRecoveryReplays> recovery replays; latest divergent event was <eventId>. Last divergence: <details>

Workflows persist their progress as an ordered event log. During replay, the runtime processes each event in sequence — every event must be consumed by a matching callback (e.g., a step or sleep waiting for its result). When an event has no matching consumer, the runtime cannot advance past it, which would block all subsequent events and hang the workflow indefinitely.

Instead of silently hanging, the runtime retries a divergent replay before failing the workflow and surfacing this terminal error.

Common scenarios that produce this error:

  1. Duplicate completion events — Two wait_completed events for a single wait_created, or two step_completed events for the same step. The first is consumed normally, but the second has no consumer.
  2. Orphaned events — A step_completed or wait_completed event whose correlationId doesn't match any step or sleep in the workflow code.
  3. Events after terminal state — An event that arrives after its corresponding step or wait has already reached a terminal state (e.g., step_retrying after step_completed).

This error indicates a bug in the Workflow SDK or Workflow server — not in your workflow code. Your workflow code does not need to change. Follow these steps to resolve the issue:

1. Upgrade to the latest workflow package

The bug that caused the corrupted event log may have already been identified and fixed in a newer version. Update to the latest version:

npm install workflow@latest

2. Retry the failed run

If this error is displayed, automatic replay recovery has already been exhausted and the run has been marked as failed. You can re-run it using the Re-run button in the Workflow Dashboard.

3. Report the issue

If the error persists after upgrading, please open an issue on GitHub so we can investigate and fix the underlying bug. Include the following details to help us diagnose the problem:

  • The version of the workflow package you are using
  • The run ID(s) of the affected workflow run(s)
  • The error message (including eventType, correlationId, and eventId)
  • Any details about the event log or the workflow that triggered the error

Unlike other workflow errors, a corrupted event log error is not catchable inside your workflow function. Because the event log itself is invalid, the runtime cannot safely continue executing any user code. The entire run fails immediately and is marked as failed.

To handle this programmatically from outside the workflow, you can check the run status:

import { getRun } from "workflow/api";

const run = getRun("wrun_abc123");
const status = await run.status;
if (status === "failed") {
  console.error("Run failed");
}