Skip to content

Guard workflow results against Promise clone failures - #21

Merged
Michaelliv merged 1 commit into
mainfrom
investigate-issue-12-promise-clone
May 31, 2026
Merged

Guard workflow results against Promise clone failures#21
Michaelliv merged 1 commit into
mainfrom
investigate-issue-12-promise-clone

Conversation

@Michaelliv

Copy link
Copy Markdown
Owner

Summary

  • wait for started workflow subagents to settle before returning from the runtime
  • reject non-structured-cloneable workflow results with a targeted forgot-to-await error
  • validate runtime phase titles and agent prompt/options before they enter progress snapshots

Fixes #12

Verification

  • npm test
  • reproduced return { leaked: agent(...) } locally; now reports a workflow error instead of crashing Pi

@Michaelliv
Michaelliv merged commit 1c61834 into main May 31, 2026
1 check passed
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.

[bug] Error: #<Promise> could not be cloned.

1 participant