Skip to content

Stale generated files in app/.well-known/workflow break streaming after code changes #469

@snarktank

Description

@snarktank

Bug Description

Generated route files in app/.well-known/workflow/ become stale after workflow code changes, causing streams to never reach the client even though workflows complete successfully.

Reproduction Steps

  1. Create a workflow using DurableAgent with getWritable<UIMessageChunk>()
  2. Run the workflow successfully (streaming works)
  3. Make any code change to the workflow file
  4. Hot reload triggers, workflow bundles rebuild
  5. Send a new message - workflow completes but stream never delivers to client

Observed Behavior

  • Workflow step completes in ~1-2 seconds (verified via npx workflow inspect step)
  • API POST hangs for 30+ seconds until timeout
  • ResponseAborted errors in console
  • No stream data reaches the client

Expected Behavior

Stream should deliver to client after code changes without manual intervention.

Workaround

Delete generated files before each dev server start:

"dev": "rm -rf app/.well-known && next dev --turbopack"

Environment

  • workflow: 4.0.1-beta.19
  • @workflow/ai: 4.0.1-beta.19
  • ai: 5.0.104
  • Next.js 15 with Turbopack
  • macOS

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions