Skip to content

[ai] Fix fatal stream errors surfacing as [object Object]#1589

Merged
VaguelySerious merged 1 commit intomainfrom
peter/issue-1545
Apr 2, 2026
Merged

[ai] Fix fatal stream errors surfacing as [object Object]#1589
VaguelySerious merged 1 commit intomainfrom
peter/issue-1545

Conversation

@VaguelySerious
Copy link
Copy Markdown
Member

Summary

Closes #1545

  • Extract getErrorMessage() utility that prefers error.message, then JSON.stringify() for plain objects, avoiding the String(error)[object Object] pitfall
  • Replace String(error) in do-stream-step.ts (error chunk serialization) and workflow-chat-transport.ts (reconnection error message)
  • Remove duplicate local getErrorMessage from durable-agent.ts in favor of the shared utility

Test plan

  • Unit tests for getErrorMessage covering Error instances, strings, plain objects, null/undefined, arrays
  • Integration test for WorkflowChatTransport reconnection error formatting
  • Existing do-stream-step and workflow-chat-transport tests pass

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 2, 2026 4:34pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 2, 2026 4:34pm
example-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-astro-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-express-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-fastify-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-hono-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-nitro-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workbench-vite-workflow Ready Ready Preview, Comment Apr 2, 2026 4:34pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 2, 2026 4:34pm
workflow-swc-playground Ready Ready Preview, Comment Apr 2, 2026 4:34pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 857 0 67 924
✅ 💻 Local Development 830 0 178 1008
✅ 📦 Local Production 830 0 178 1008
✅ 🐘 Local Postgres 830 0 178 1008
✅ 🪟 Windows 76 0 8 84
❌ 🌍 Community Worlds 132 60 24 216
✅ 📋 Other 210 0 42 252
Total 3765 60 675 4500

❌ Failed Tests

🌍 Community Worlds (60 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KN7GS337TPTYK7QKWVHCWDZQ
  • webhookWorkflow | wrun_01KN7GSC3H5ASNMK8XG9X23XYV
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KN7H1NR296SMB0F87XJSF5EE

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KN7GS337TPTYK7QKWVHCWDZQ
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KN7H1NR296SMB0F87XJSF5EE

turso (55 failed):

  • addTenWorkflow | wrun_01KN7GQQAR1SWSXTXYRW44QQSS
  • addTenWorkflow | wrun_01KN7GQQAR1SWSXTXYRW44QQSS
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KN7GR5PVK4KBV8D5TJKTWWV4
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KN7GQYBQ0N0AWXF0HDP7VNEE
  • promiseRaceWorkflow | wrun_01KN7GR478WXC1WZ6RWWE1V8B9
  • promiseAnyWorkflow | wrun_01KN7GR8VM5K942MM4X4ZDZ0BS
  • importedStepOnlyWorkflow | wrun_01KN7GRGA1MD1K791H4FGPJM3D
  • hookWorkflow | wrun_01KN7GRPMKY0PMQJB2SFTT03RW
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KN7GS337TPTYK7QKWVHCWDZQ
  • webhookWorkflow | wrun_01KN7GSC3H5ASNMK8XG9X23XYV
  • sleepingWorkflow | wrun_01KN7GSK6EG90M50F3RE3HYXJR
  • parallelSleepWorkflow | wrun_01KN7GSZ1XTSRZDSKR1W6V8090
  • nullByteWorkflow | wrun_01KN7GT2QJBQN36J0HYCZP5XDM
  • workflowAndStepMetadataWorkflow | wrun_01KN7GT543S402H9YMCE0TJ99D
  • fetchWorkflow | wrun_01KN7GX9XD5BKJC7JP19M897Y0
  • promiseRaceStressTestWorkflow | wrun_01KN7GXDKEQQJ81QZHM9C6Y9N4
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KN7H10QPZT5JRN6818RZWHNG
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KN7H1NR296SMB0F87XJSF5EE
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KN7H2C7KFFSQNSPKJEGFAV78
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KN7H30BPFS6XTMPE379F5R01
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KN7H39HMCXTHCJD477W114CZ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KN7H3F7QVP3NREXQMMWETNCH
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KN7H3HHGSCYVRZ3ED6GQC8C7
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KN7H41MEXWA86QHKGZTAB06F
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KN7H49BRPW9KRV46D85MDVSC
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KN7H4F4V8YDHGVMJSZF2P8MH
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KN7H4PB76N3YGD7SGS4M9C5F
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KN7H4X6BK8TGBXZM62CS5TVC
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KN7H545NDCJP35ABTJ36SXMC
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KN7H5B145BGSRKZYXF1JZVNE
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KN7H5QKT0PZ4EH7PZSZMA2GC
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KN7H5ZN6PSYR3VVDCP0YX0X7
  • cancelRun - cancelling a running workflow | wrun_01KN7H66MQ9SQDG5T2HC87QH3K
  • cancelRun via CLI - cancelling a running workflow | wrun_01KN7H6GNJYDAQGBC0Z4NN51KG
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KN7H6X0KDFV9NR6AAXQTM7E9
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KN7H7K6MX6C3GH9SKY1FWK4J
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KN7H7YD7B2781BB6E5M71FNC
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KN7H85948P7H37GB7HH6CTTD

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 77 0 7
✅ example 77 0 7
✅ express 77 0 7
✅ fastify 77 0 7
✅ hono 77 0 7
✅ nextjs-turbopack 82 0 2
✅ nextjs-webpack 82 0 2
✅ nitro 77 0 7
✅ nuxt 77 0 7
✅ sveltekit 77 0 7
✅ vite 77 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 70 0 14
✅ express-stable 70 0 14
✅ fastify-stable 70 0 14
✅ hono-stable 70 0 14
✅ nextjs-turbopack-canary 59 0 25
✅ nextjs-turbopack-stable 76 0 8
✅ nextjs-webpack-canary 59 0 25
✅ nextjs-webpack-stable 76 0 8
✅ nitro-stable 70 0 14
✅ nuxt-stable 70 0 14
✅ sveltekit-stable 70 0 14
✅ vite-stable 70 0 14
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 70 0 14
✅ express-stable 70 0 14
✅ fastify-stable 70 0 14
✅ hono-stable 70 0 14
✅ nextjs-turbopack-canary 59 0 25
✅ nextjs-turbopack-stable 76 0 8
✅ nextjs-webpack-canary 59 0 25
✅ nextjs-webpack-stable 76 0 8
✅ nitro-stable 70 0 14
✅ nuxt-stable 70 0 14
✅ sveltekit-stable 70 0 14
✅ vite-stable 70 0 14
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 70 0 14
✅ express-stable 70 0 14
✅ fastify-stable 70 0 14
✅ hono-stable 70 0 14
✅ nextjs-turbopack-canary 59 0 25
✅ nextjs-turbopack-stable 76 0 8
✅ nextjs-webpack-canary 59 0 25
✅ nextjs-webpack-stable 76 0 8
✅ nitro-stable 70 0 14
✅ nuxt-stable 70 0 14
✅ sveltekit-stable 70 0 14
✅ vite-stable 70 0 14
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 76 0 8
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 5 0 0
❌ mongodb 56 3 8
✅ redis-dev 5 0 0
❌ redis 57 2 8
✅ turso-dev 5 0 0
❌ turso 4 55 8
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 70 0 14
✅ e2e-local-postgres-nest-stable 70 0 14
✅ e2e-local-prod-nest-stable 70 0 14

📋 View full workflow run

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 2, 2026

🦋 Changeset detected

Latest commit: 9076035

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

This PR includes changesets to release 1 package
Name Type
@workflow/ai 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.042s (-7.8% 🟢) 1.006s (~) 0.964s 10 1.00x
💻 Local Nitro 0.044s (-1.6%) 1.005s (~) 0.961s 10 1.05x
🐘 Postgres Nitro 0.059s (-15.6% 🟢) 1.011s (~) 0.952s 10 1.42x
🐘 Postgres Express 0.066s (-4.1%) 1.013s (~) 0.947s 10 1.59x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 0.511s (-13.8% 🟢) 2.708s (+9.9% 🔺) 2.196s 10 1.00x
▲ Vercel Nitro 0.553s (+5.5% 🔺) 2.245s (-18.3% 🟢) 1.692s 10 1.08x
▲ Vercel Express 1.012s (+101.0% 🔺) 2.939s (+9.1% 🔺) 1.926s 10 1.98x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.126s (~) 2.005s (~) 0.879s 10 1.00x
💻 Local Nitro 1.128s (~) 2.006s (~) 0.878s 10 1.00x
🐘 Postgres Nitro 1.151s (~) 2.012s (~) 0.861s 10 1.02x
🐘 Postgres Express 1.160s (+0.8%) 2.014s (~) 0.854s 10 1.03x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.102s (+0.9%) 3.446s (-11.6% 🟢) 1.344s 10 1.00x
▲ Vercel Express 2.502s (+10.5% 🔺) 4.175s (+5.5% 🔺) 1.674s 10 1.19x
▲ Vercel Next.js (Turbopack) 2.571s (+22.9% 🔺) 4.189s (+7.3% 🔺) 1.618s 10 1.22x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 10.873s (~) 11.022s (~) 0.148s 3 1.00x
🐘 Postgres Express 10.909s (~) 11.022s (~) 0.113s 3 1.00x
💻 Local Express 10.913s (~) 11.023s (~) 0.110s 3 1.00x
💻 Local Nitro 10.913s (~) 11.023s (~) 0.111s 3 1.00x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 16.596s (-27.9% 🟢) 17.508s (-31.1% 🟢) 0.912s 2 1.00x
▲ Vercel Express 17.180s (-2.0%) 19.299s (-1.8%) 2.119s 2 1.04x
▲ Vercel Next.js (Turbopack) 18.024s (+5.5% 🔺) 19.936s (+4.2%) 1.912s 2 1.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 14.534s (~) 15.027s (~) 0.493s 4 1.00x
🐘 Postgres Express 14.687s (+0.5%) 15.024s (~) 0.337s 4 1.01x
💻 Local Express 14.887s (~) 15.028s (~) 0.141s 4 1.02x
💻 Local Nitro 14.895s (-0.6%) 15.028s (~) 0.133s 4 1.02x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 31.299s (-5.6% 🟢) 33.383s (-4.8%) 2.083s 2 1.00x
▲ Vercel Express 31.847s (-9.0% 🟢) 33.274s (-9.6% 🟢) 1.427s 2 1.02x
▲ Vercel Nitro 32.376s (+0.7%) 33.455s (-2.0%) 1.079s 2 1.03x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 13.972s (-0.9%) 14.453s (-1.9%) 0.481s 7 1.00x
🐘 Postgres Express 14.057s (-2.3%) 14.739s (-1.9%) 0.682s 7 1.01x
💻 Local Express 16.484s (-0.8%) 17.029s (~) 0.545s 6 1.18x
💻 Local Nitro 16.573s (~) 17.030s (~) 0.457s 6 1.19x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 51.769s (-10.0% 🟢) 53.091s (-11.5% 🟢) 1.322s 2 1.00x
▲ Vercel Express 52.377s (-6.7% 🟢) 53.931s (-7.3% 🟢) 1.555s 2 1.01x
▲ Vercel Next.js (Turbopack) 54.233s (-9.4% 🟢) 56.368s (-8.4% 🟢) 2.135s 2 1.05x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.269s (~) 2.012s (~) 0.743s 15 1.00x
🐘 Postgres Nitro 1.303s (+3.2%) 2.011s (~) 0.708s 15 1.03x
💻 Local Express 1.515s (-1.6%) 2.006s (~) 0.490s 15 1.19x
💻 Local Nitro 1.534s (~) 2.006s (~) 0.472s 15 1.21x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.426s (-6.8% 🟢) 3.889s (-4.3%) 1.463s 8 1.00x
▲ Vercel Express 2.483s (-4.1%) 3.875s (-13.6% 🟢) 1.392s 8 1.02x
▲ Vercel Nitro 2.733s (+12.1% 🔺) 3.909s (-3.2%) 1.176s 9 1.13x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.338s (-1.2%) 3.011s (~) 0.672s 10 1.00x
🐘 Postgres Nitro 2.365s (+0.7%) 3.009s (~) 0.644s 10 1.01x
💻 Local Express 2.833s (-3.2%) 3.208s (+6.6% 🔺) 0.376s 10 1.21x
💻 Local Nitro 2.858s (-3.6%) 3.008s (-12.9% 🟢) 0.150s 10 1.22x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.846s (-21.7% 🟢) 5.001s (-1.8%) 2.155s 6 1.00x
▲ Vercel Nitro 3.177s (+11.6% 🔺) 4.392s (+2.9%) 1.214s 7 1.12x
▲ Vercel Express 3.499s (+33.1% 🔺) 5.215s (+19.5% 🔺) 1.716s 6 1.23x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.448s (-0.8%) 4.009s (~) 0.561s 8 1.00x
🐘 Postgres Express 3.473s (~) 4.012s (~) 0.539s 8 1.01x
💻 Local Express 7.910s (-3.0%) 8.271s (-8.3% 🟢) 0.361s 4 2.29x
💻 Local Nitro 7.998s (~) 8.518s (~) 0.520s 4 2.32x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.912s (-4.1%) 4.165s (-17.6% 🟢) 1.253s 8 1.00x
▲ Vercel Next.js (Turbopack) 3.636s (-4.9%) 5.318s (-9.1% 🟢) 1.682s 6 1.25x
▲ Vercel Express 3.663s (~) 5.390s (-5.1% 🟢) 1.728s 6 1.26x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.262s (+0.6%) 2.010s (~) 0.748s 15 1.00x
🐘 Postgres Nitro 1.270s (~) 2.010s (~) 0.740s 15 1.01x
💻 Local Nitro 1.510s (-4.2%) 2.005s (~) 0.495s 15 1.20x
💻 Local Express 1.528s (-1.8%) 2.006s (~) 0.478s 15 1.21x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.366s (+2.0%) 4.149s (+3.5%) 1.784s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.512s (+6.1% 🔺) 4.108s (+3.0%) 1.596s 8 1.06x
▲ Vercel Nitro 2.704s (+10.4% 🔺) 3.957s (-1.0%) 1.253s 8 1.14x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.324s (-1.4%) 3.010s (~) 0.686s 10 1.00x
🐘 Postgres Express 2.341s (+1.0%) 3.010s (~) 0.668s 10 1.01x
💻 Local Express 2.892s (-7.4% 🟢) 3.342s (-14.0% 🟢) 0.450s 9 1.24x
💻 Local Nitro 2.968s (-2.6%) 3.453s (-11.1% 🟢) 0.485s 9 1.28x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.788s (-3.7%) 3.977s (-7.8% 🟢) 1.189s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.946s (-5.4% 🟢) 4.662s (~) 1.716s 7 1.06x
▲ Vercel Express 2.957s (+1.1%) 4.596s (+1.2%) 1.639s 7 1.06x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.459s (-1.1%) 4.010s (~) 0.550s 8 1.00x
🐘 Postgres Express 3.475s (~) 4.011s (~) 0.536s 8 1.00x
💻 Local Nitro 8.469s (-1.7%) 9.022s (~) 0.553s 4 2.45x
💻 Local Express 8.547s (-3.4%) 9.027s (-2.7%) 0.479s 4 2.47x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.920s (+17.6% 🔺) 5.072s (+5.7% 🔺) 1.152s 6 1.00x
▲ Vercel Express 3.948s (+33.9% 🔺) 5.468s (+22.6% 🔺) 1.519s 6 1.01x
▲ Vercel Next.js (Turbopack) 3.961s (+4.2%) 5.693s (~) 1.732s 6 1.01x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.816s (-3.5%) 1.007s (~) 0.191s 60 1.00x
🐘 Postgres Express 0.858s (+2.0%) 1.008s (~) 0.150s 60 1.05x
💻 Local Nitro 0.968s (-2.0%) 1.021s (-13.5% 🟢) 0.053s 59 1.19x
💻 Local Express 0.980s (~) 1.181s (~) 0.201s 51 1.20x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 9.331s (-9.1% 🟢) 11.155s (-8.9% 🟢) 1.824s 6 1.00x
▲ Vercel Next.js (Turbopack) 9.789s (-14.2% 🟢) 11.753s (-12.4% 🟢) 1.964s 6 1.05x
▲ Vercel Express 9.950s (-0.9%) 11.646s (-4.0%) 1.696s 6 1.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.940s (-4.5%) 2.101s (-22.6% 🟢) 0.162s 43 1.00x
🐘 Postgres Express 2.043s (+1.1%) 2.686s (+1.8%) 0.643s 34 1.05x
💻 Local Express 2.977s (-1.9%) 3.258s (-9.2% 🟢) 0.281s 28 1.53x
💻 Local Nitro 3.002s (~) 3.508s (-2.8%) 0.506s 26 1.55x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 28.664s (-16.4% 🟢) 30.000s (-17.4% 🟢) 1.336s 4 1.00x
▲ Vercel Express 29.148s (-14.1% 🟢) 30.963s (-13.0% 🟢) 1.815s 3 1.02x
▲ Vercel Next.js (Turbopack) 30.987s (-9.7% 🟢) 33.026s (-8.4% 🟢) 2.039s 3 1.08x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.944s (-3.9%) 4.148s (-13.8% 🟢) 0.205s 29 1.00x
🐘 Postgres Express 4.138s (~) 4.973s (+2.5%) 0.836s 25 1.05x
💻 Local Express 9.081s (-1.3%) 9.633s (-3.8%) 0.552s 13 2.30x
💻 Local Nitro 9.158s (~) 9.941s (+1.6%) 0.783s 13 2.32x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 72.335s (-16.4% 🟢) 74.331s (-16.0% 🟢) 1.996s 2 1.00x
▲ Vercel Nitro 73.403s (-16.4% 🟢) 75.121s (-16.3% 🟢) 1.719s 2 1.01x
▲ Vercel Next.js (Turbopack) 76.103s (-17.4% 🟢) 77.903s (-17.0% 🟢) 1.801s 2 1.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.281s (-5.1% 🟢) 1.008s (~) 0.727s 60 1.00x
🐘 Postgres Express 0.287s (-2.9%) 1.008s (~) 0.721s 60 1.02x
💻 Local Nitro 0.573s (-1.1%) 1.004s (~) 0.431s 60 2.04x
💻 Local Express 0.594s (-2.6%) 1.005s (-1.6%) 0.411s 60 2.12x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.556s (-7.9% 🟢) 2.810s (-17.3% 🟢) 1.254s 22 1.00x
▲ Vercel Express 1.816s (+4.2%) 3.407s (+2.8%) 1.591s 18 1.17x
▲ Vercel Next.js (Turbopack) 2.025s (+1.1%) 3.547s (-3.1%) 1.522s 17 1.30x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.491s (-4.8%) 1.008s (~) 0.517s 90 1.00x
🐘 Postgres Express 0.514s (-1.8%) 1.008s (~) 0.494s 90 1.05x
💻 Local Nitro 2.483s (-2.7%) 3.009s (~) 0.526s 30 5.06x
💻 Local Express 2.538s (~) 3.008s (~) 0.470s 30 5.17x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.989s (-4.8%) 4.649s (-4.7%) 1.659s 20 1.00x
▲ Vercel Nitro 3.249s (-20.0% 🟢) 4.624s (-18.1% 🟢) 1.375s 20 1.09x
▲ Vercel Next.js (Turbopack) 4.089s (-92.7% 🟢) 5.771s (-90.0% 🟢) 1.682s 16 1.37x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.782s (-2.5%) 1.008s (~) 0.226s 120 1.00x
🐘 Postgres Express 0.858s (+4.3%) 1.029s (+1.9%) 0.172s 117 1.10x
💻 Local Nitro 11.067s (-1.0%) 11.848s (+0.8%) 0.781s 11 14.14x
💻 Local Express 11.119s (-1.2%) 11.577s (-2.3%) 0.458s 11 14.21x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 6.493s (-21.5% 🟢) 7.819s (-22.7% 🟢) 1.325s 16 1.00x
▲ Vercel Express 7.578s (-2.6%) 9.441s (+1.3%) 1.863s 13 1.17x
▲ Vercel Next.js (Turbopack) 8.529s (+8.1% 🔺) 10.334s (+7.4% 🔺) 1.805s 12 1.31x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.198s (-6.5% 🟢) 0.997s (~) 0.001s (+16.7% 🔺) 1.012s (~) 0.814s 10 1.00x
💻 Local Express 0.207s (~) 1.004s (~) 0.011s (-8.3% 🟢) 1.017s (~) 0.810s 10 1.04x
💻 Local Nitro 0.213s (+5.0% 🔺) 1.003s (~) 0.011s (+3.7%) 1.017s (~) 0.804s 10 1.08x
🐘 Postgres Express 0.217s (-1.5%) 0.993s (~) 0.001s (-14.3% 🟢) 1.011s (~) 0.793s 10 1.10x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 1.660s (~) 3.076s (+8.1% 🔺) 0.339s (-45.4% 🟢) 4.020s (-3.4%) 2.360s 10 1.00x
▲ Vercel Nitro 1.695s (+2.1%) 2.626s (-8.5% 🟢) 0.635s (+13.4% 🔺) 3.791s (-7.7% 🟢) 2.097s 10 1.02x
▲ Vercel Express 1.752s (+0.9%) 3.072s (-1.4%) 0.341s (-46.6% 🟢) 4.037s (-11.6% 🟢) 2.284s 10 1.06x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.609s (-2.3%) 1.002s (~) 0.004s (-3.3%) 1.023s (~) 0.414s 59 1.00x
🐘 Postgres Express 0.642s (+3.1%) 1.004s (~) 0.004s (-1.3%) 1.024s (~) 0.383s 59 1.05x
💻 Local Express 0.716s (-1.6%) 1.010s (~) 0.009s (+12.4% 🔺) 1.022s (~) 0.306s 59 1.18x
💻 Local Nitro 0.720s (-1.2%) 1.010s (~) 0.009s (+8.5% 🔺) 1.022s (~) 0.303s 59 1.18x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.275s (+1.5%) 5.590s (+1.8%) 0.237s (-52.0% 🟢) 6.530s (-1.5%) 2.255s 10 1.00x
▲ Vercel Nitro 4.543s (+10.0% 🔺) 5.489s (+3.0%) 0.266s (+12.5% 🔺) 6.251s (~) 1.707s 10 1.06x
▲ Vercel Next.js (Turbopack) 4.951s (-18.7% 🟢) 6.407s (-16.5% 🟢) 0.379s (+65.9% 🔺) 7.439s (-13.7% 🟢) 2.489s 9 1.16x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.958s (-4.3%) 1.122s (-17.2% 🟢) 0.000s (-59.3% 🟢) 1.138s (-17.5% 🟢) 0.180s 54 1.00x
🐘 Postgres Express 0.994s (+2.7%) 1.247s (+2.0%) 0.000s (+104.3% 🔺) 1.284s (+2.6%) 0.290s 47 1.04x
💻 Local Nitro 1.223s (-1.9%) 2.021s (~) 0.000s (~) 2.024s (~) 0.801s 30 1.28x
💻 Local Express 1.232s (-0.9%) 2.020s (~) 0.001s (+114.3% 🔺) 2.023s (~) 0.791s 30 1.29x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.881s (+15.6% 🔺) 5.264s (+22.6% 🔺) 0.000s (+Infinity% 🔺) 5.734s (+14.6% 🔺) 1.853s 11 1.00x
▲ Vercel Express 4.222s (+19.3% 🔺) 5.352s (+18.8% 🔺) 0.000s (-100.0% 🟢) 6.038s (+16.0% 🔺) 1.816s 10 1.09x
▲ Vercel Next.js (Turbopack) 4.545s (+44.0% 🔺) 5.722s (+33.1% 🔺) 0.000s (-100.0% 🟢) 6.426s (+30.0% 🔺) 1.881s 10 1.17x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.774s (-1.1%) 2.139s (~) 0.000s (~) 2.153s (~) 0.379s 28 1.00x
🐘 Postgres Express 1.838s (+3.4%) 2.101s (-0.9%) 0.000s (NaN%) 2.116s (-2.3%) 0.278s 29 1.04x
💻 Local Nitro 3.487s (-3.4%) 4.034s (-1.6%) 0.001s (+55.6% 🔺) 4.038s (-1.6%) 0.551s 15 1.97x
💻 Local Express 3.566s (+2.9%) 4.098s (+1.6%) 0.001s (+10.0% 🔺) 4.102s (+1.6%) 0.536s 15 2.01x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.430s (+0.6%) 5.360s (-2.5%) 0.000s (NaN%) 6.043s (-2.0%) 1.613s 10 1.00x
▲ Vercel Nitro 4.512s (-1.8%) 5.376s (-4.4%) 0.001s (+1263.6% 🔺) 5.860s (-7.0% 🟢) 1.348s 11 1.02x
▲ Vercel Next.js (Turbopack) 4.690s (-1.8%) 5.859s (-0.6%) 0.000s (-100.0% 🟢) 6.560s (-0.7%) 1.870s 10 1.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Express 13/21
🐘 Postgres Nitro 18/21
▲ Vercel Nitro 11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 18/21
Next.js (Turbopack) ▲ Vercel 21/21
Nitro 🐘 Postgres 18/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Replace String(error) with getErrorMessage() that prefers error.message,
falls back to JSON.stringify for plain objects, avoiding the [object Object]
pitfall. Extract shared utility from durable-agent.ts and use it in
do-stream-step.ts and workflow-chat-transport.ts.

Closes #1545

Signed-off-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Copy link
Copy Markdown
Contributor

@karthikscale3 karthikscale3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: Approve — correct fix, well-scoped, low regression risk.

  1. Complete coverage: Both String(error) call sites in @workflow/ai are fixed. The existing getErrorMessage in durable-agent.ts is properly deduplicated into the shared utility.

  2. Integration test is fragile: The reconnection error formatting test does a second reader.read() after the reader is already in an error state — the assertion may not execute reliably. The unit tests on getErrorMessage itself are solid though.

  3. Edge case: JSON.stringify can throw on circular references. Matches AI SDK's own getErrorMessage behavior so it's consistent, but a try/catch fallback would be more defensive.

@VaguelySerious VaguelySerious merged commit c0f07a9 into main Apr 2, 2026
105 checks passed
@VaguelySerious VaguelySerious deleted the peter/issue-1545 branch April 2, 2026 19:37
@ghost ghost mentioned this pull request Apr 2, 2026
pranaygp added a commit that referenced this pull request Apr 3, 2026
…1-refresh

* origin/main: (21 commits)
  Fix node-module-error plugin matching identifiers in multi-line comments (#1554)
  fix(swc-plugin): use binding name for class expression method registrations (#1599)
  fix(builders): override `sideEffects: false` for discovered workflow/step/serde entries (#1598)
  [world-vercel] align header names to `x-vercel-workflow-*` convention (#1602)
  [docs] Add vercel world consumer function security documentation (#1543)
  Make `start()` types `unknown` when `deploymentId` is provided (#1367)
  fix(next): stop force-setting WORKFLOW_PUBLIC_MANIFEST=1 during next dev (#1597)
  Version Packages (beta) (#1593)
  [docs] Tidy world API docs and document new stream helpers (#1581)
  Rename 'Workflow Development Kit' / 'DevKit' to 'Workflow SDK' (#1595)
  [world] Use zod/v4 in queue files to match @workflow/world schemas (#1588)
  [ai] Fix fatal stream errors surfacing as [object Object] (#1589)
  [web] Fix server crash on unmatched routes (#1590)
  docs: rename 'Complex Example' to 'Instance Methods as Steps' (#1592)
  Version Packages (beta) (#1563)
  [core] Extend flow route duration to "max" and fail runs where replay takes too long (#1567)
  fix: check target run capabilities before encrypting hook payloads (#1572)
  [core] Combine initial run fetch, event fetch, and run_started event creation (#1569)
  [docs] Split World API docs into sub-pages, update skill.md (#1457)
  [nitro] Preserve workflow step registration side effects (#1386)
  ...

# Conflicts:
#	skills/workflow/SKILL.md
@ghost ghost mentioned this pull request Apr 7, 2026
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.

DurableAgent surfaces fatal stream errors as [object Object] and does not clearly signal a terminal failure to stream consumers

2 participants