Skip to content

🤖 fix: prefer foreground workflow runs#3462

Merged
ThomasK33 merged 1 commit into
mainfrom
fix/workflow-run-foreground-guidance
Jun 5, 2026
Merged

🤖 fix: prefer foreground workflow runs#3462
ThomasK33 merged 1 commit into
mainfrom
fix/workflow-run-foreground-guidance

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

Summary

Update workflow tooling guidance so agents default to foreground workflow_run calls and reserve background workflow runs for cases where parallel or independent work can proceed.

Background

Foreground workflow runs return the completed result directly. Recommending foreground by default avoids an unnecessary task_await round-trip when the agent has no useful work to do while the workflow runs.

Implementation

  • Added schema-level guidance to workflow_run.run_in_background.
  • Updated the workflow_run tool description and task_await warning text.
  • Updated the workflow authoring skill with foreground-first workflow invocation guidance.
  • Regenerated tool hook docs and built-in skill content.

Validation

  • make static-check
  • bun test src/common/utils/tools/toolDefinitions.test.ts
  • make typecheck

Risks

Low. This changes tool and skill guidance text only; no workflow execution behavior changes.


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

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

@mintlify
Copy link
Copy Markdown

mintlify Bot commented Jun 5, 2026

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

Project Status Preview Updated (UTC)
Mux 🟢 Ready View Preview Jun 5, 2026, 7:24 AM

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

Copy link
Copy Markdown

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

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: 9b9a827d9e

ℹ️ 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/common/utils/tools/toolDefinitions.ts Outdated
@ThomasK33 ThomasK33 force-pushed the fix/workflow-run-foreground-guidance branch from 9b9a827 to 773b3ab Compare June 5, 2026 07:28
@ThomasK33
Copy link
Copy Markdown
Member Author

Addressed Codex feedback:

  • src/common/utils/tools/toolDefinitions.ts:1587: preserved guidance for the status=backgrounded foreground-wait fallback. The tool description, schema description, and workflow-authoring skill now say to await the returned runId whenever workflow_run returns status: "backgrounded" before using the result.

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Please take another look.

Copy link
Copy Markdown

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

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: 773b3ab171

ℹ️ 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/common/utils/tools/toolDefinitions.ts Outdated
Update workflow_run and workflow-authoring guidance to recommend foreground execution by default, reserving background mode for parallel work that can proceed while the workflow runs.

---

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

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=2.89 -->
@ThomasK33 ThomasK33 force-pushed the fix/workflow-run-foreground-guidance branch from 773b3ab to 8b7a3d0 Compare June 5, 2026 07:31
@ThomasK33
Copy link
Copy Markdown
Member Author

Addressed Codex feedback:

  • src/common/utils/tools/toolDefinitions.ts:832: expanded the await guidance to cover both status=running and status=backgrounded, so background-mode workflow runs also tell agents to task_await the returned runId before using or reporting workflow output.

@ThomasK33
Copy link
Copy Markdown
Member Author

@codex review

Please take another look.

@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".

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit 2b5de0e Jun 5, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the fix/workflow-run-foreground-guidance branch June 5, 2026 08:18
@mux-bot mux-bot Bot mentioned this pull request Jun 5, 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