Skip to content

🤖 fix: isolate workflow-owned sub-agent outputs#3451

Merged
ThomasK33 merged 3 commits into
mainfrom
workflow-agents-y0y4
Jun 4, 2026
Merged

🤖 fix: isolate workflow-owned sub-agent outputs#3451
ThomasK33 merged 3 commits into
mainfrom
workflow-agents-y0y4

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

@ThomasK33 ThomasK33 commented Jun 4, 2026

Summary

Hide workflow-owned sub-agents from parent-facing task discovery and direct awaits so parent agents consume workflow-vetted output through workflow runs instead of raw child reports.

Background

Workflow-launched sub-agents are coordinated by the workflow runner, which owns their reports, retries, structured output validation, and final synthesis. Parent agents should not accidentally discover or await those raw child task outputs through task_list or task_await.

Implementation

  • Exclude workflow-owned descendants from task_list, including descendants of workflow-owned tasks.
  • Exclude workflow-owned descendants and their background bash tasks from omitted-task_ids task_await discovery.
  • Reject explicit task_await calls for workflow-owned agent task IDs and bash processes in workflow-owned descendant workspaces.
  • Persist workflow-owned ancestor metadata with subagent report artifacts so the guard survives task cleanup/restart.
  • Update task_await tool contract and generated hook docs to document the workflow-owned exclusion.
  • Relax built-in workflow unit test timeouts after CI hit Bun's 5s default while those tests passed locally just under that boundary.

Validation

  • bun test src/node/services/tools/task_await.test.ts src/node/services/tools/task.bash.test.ts src/node/services/tools/task_list.test.ts src/node/services/taskService.test.ts
  • bun test src/node/services/workflows/builtInWorkflowDefinitions.test.ts
  • make static-check

Risks

Medium risk in task/workflow orchestration behavior: this deliberately changes which descendant tasks are visible/awaitable from a parent workspace. Regular sub-agent tasks and workflow run awaits remain supported; workflow-owned child output is intentionally reachable only through workflow run results.


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

ThomasK33 added 2 commits June 4, 2026 15:50
Hide workflow-owned sub-agents and their background bash tasks from task_list/default task_await discovery so parent agents only see vetted workflow-run output.\n\nValidation:\n- bun test src/node/services/tools/task_list.test.ts src/node/services/tools/task.bash.test.ts src/node/services/taskService.test.ts\n- make typecheck\n- make lint\n\n---\n\n_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `.19`_\n\n<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=6.19 -->
Reject explicit task_await calls for workflow-owned agent tasks and descendant bash processes so parent agents cannot bypass workflow-run vetting. Persist workflow-ownership metadata with subagent reports so the guard still works after task cleanup/restart.\n\nAlso update task_await's tool contract and generated hook docs to document the omitted-ID workflow-owned exclusion.\n\nValidation:\n- bun test src/node/services/tools/task_await.test.ts src/node/services/tools/task.bash.test.ts src/node/services/tools/task_list.test.ts src/node/services/taskService.test.ts\n- make static-check\n\n---\n\n_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `5.41`_\n\n<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=25.41 -->
@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Please review this workflow-owned sub-agent output isolation change.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ 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".

@mintlify
Copy link
Copy Markdown

mintlify Bot commented Jun 4, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Mux 🟢 Ready View Preview Jun 4, 2026, 4:00 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Re-requesting after the CI timeout fix commit.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ 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".

Increase built-in workflow test timeouts after CI hit Bun's 5s default while these tests passed locally just under that boundary.\n\nValidation:\n- bun test src/node/services/workflows/builtInWorkflowDefinitions.test.ts\n- make static-check\n\n---\n\n_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `6.26`_\n\n<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=36.26 -->
@ThomasK33 ThomasK33 force-pushed the workflow-agents-y0y4 branch from 58586c2 to 7b5c39a Compare June 4, 2026 16:12
@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Re-requesting after the built-in workflow timeout fix.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ 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 4, 2026
Merged via the queue into main with commit d49bdcc Jun 4, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the workflow-agents-y0y4 branch June 4, 2026 16:34
@mux-bot mux-bot Bot mentioned this pull request Jun 4, 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.

1 participant