Skip to content

🤖 feat: add durable workflow action parallelism#3572

Merged
ThomasK33 merged 3 commits into
mainfrom
improve-parallelization-tools
Jun 16, 2026
Merged

🤖 feat: add durable workflow action parallelism#3572
ThomasK33 merged 3 commits into
mainfrom
improve-parallelization-tools

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds durable same-workspace workflow concurrency primitives so workflows can fan out host actions and child workflow starts without spawning child agent workspaces.

Background

Workflow authors could previously use parallelAgents for concurrent child-agent work, but same-checkout scheduled workflows needed a host-level concurrency boundary for workspace actions. Native Promise.all inside the QuickJS/Asyncify sandbox does not provide true concurrent host action execution, so this adds explicit durable primitives.

Implementation

  • Adds parallelActions(specs, options?) for durable host-side action fan-out with stable step IDs, duplicate-ID validation, ordered results, and optional maxParallel.
  • Adds parallelWorkflows(specs, options?) as a wrapper over built-in workflows.start, preserving child workflow replay semantics while reporting wrapper-specific validation errors.
  • Handles foreground backgrounding by aborting sibling parallel action waits so the foreground run can hand off promptly.
  • Simplifies the action settlement path after the simplify workflow review, while preserving drain-on-failure behavior for already-started actions.
  • Updates workflow-authoring skill documentation and regenerated built-in skill content.

Validation

  • make static-check
  • bun test src/node/services/workflows/WorkflowRunner.test.ts — 68 passed, 0 failed
  • Project simplify workflow ran and applied the cleanup commit before the Codex follow-up fix.

Risks

Regression risk is moderate because this touches durable workflow replay and action execution. The changes are isolated to explicit primitives and covered by focused WorkflowRunner tests for concurrency, ordering, child workflow fan-out, foreground background handoff, validation errors, and replay-adjacent behavior.


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $41.62

Add same-workspace workflow concurrency primitives for durable action fan-out and child workflow fan-out, with tests and authoring guidance.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$32.19`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=32.19 -->
Simplify the parallel action settlement loop and report parallelWorkflows-specific validation errors, with focused regression coverage.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$32.19`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=32.19 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 69050fdfbd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/workflows/WorkflowRunner.ts
Abort sibling parallel action waits when a foreground wait backgrounds so workflow_run can hand off to the background runner without waiting for unrelated siblings to finish.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$41.62`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=41.62 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please take another look after the foreground-backgrounding fix.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 8e207beac7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit 3ae19ea Jun 16, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the improve-parallelization-tools branch June 16, 2026 08:29
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