-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Q Workflow Optimization Report
Issue Context
This PR addresses issue #12971, where the test-dispatcher workflow was repeatedly failing with "No Safe Outputs Generated" errors. The workflow ran successfully but didn't produce any safe outputs, causing downstream processing to fail.
Failed Run IDs Analyzed
- Run 21547216704 (original issue)
- Run 21547252198
- Run 21547524795
- Run 21547522694
- Run 21547527335
- Run 21547532343
- Run 21547522773
All runs exhibited the same pattern: agent job succeeded but produced no safe outputs.
Root Cause
The test-dispatcher workflow had a safe-outputs configuration with dispatch-workflow capability, but the prompt didn't instruct the agent to actually use it. The original prompt was:
This workflow demonstrates the dispatch-workflow safe output capability.
The agent can trigger the test-workflow using the test_workflow tool.This was too passive - it described what the agent could do, but didn't tell it what it should do.
Changes Made
.github/workflows/test-dispatcher.md
- Added explicit instructions to call the
dispatch_workflowsafe output tool - Added clear task description with specific action required
- Emphasized safe output usage with warning against file writing
- Structured prompt with sections for better clarity
The new prompt explicitly instructs:
**Your task**: Call the `dispatch_workflow` tool to trigger the `test-workflow` workflow.
**Important**: You MUST use the safe output tool - do NOT write to files or attempt other methods.Expected Improvements
- ✅ Eliminates "No Safe Outputs Generated" errors by providing clear instructions
- ✅ Improves workflow reliability with explicit task definition
- ✅ Better agent guidance with structured prompt format
- ✅ Prevents alternative approaches that don't use safe outputs
Validation
Modified workflow file validated:
- ✅ Frontmatter structure intact
- ✅ Safe output configuration preserved
- ✅ Prompt structure improved with clear task definition
- ✅ No lock files included (will be compiled automatically)
Related
Closes #12971
AI generated by Q
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download patch artifact
The patch file is available in the agent-artifacts artifact in the workflow run linked above.
To apply the patch locally:
# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/21547617819
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 21547617819 -n agent-artifacts
# The patch file will be at agent-artifacts/tmp/gh-aw/aw.patch after download
# Apply the patch
git am agent-artifacts/tmp/gh-aw/aw.patchShow patch (39 lines)
From e3d13165e248fa3f3fd7f9e16929b9c4ced0d04b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sat, 31 Jan 2026 16:50:38 +0000
Subject: [PATCH] fix(test-dispatcher): add explicit safe output instructions
The test-dispatcher workflow was failing because the prompt didn't
instruct the agent to use the dispatch_workflow safe output tool.
Changes:
- Added clear instructions to call dispatch_workflow tool
- Emphasized using safe outputs instead of file writing
- Structured prompt with task and requirements
Fixes #12971
---
.github/workflows/test-dispatcher.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/test-dispatcher.md b/.github/workflows/test-dispatcher.md
index 824b8a7..6fc9349 100644
--- a/.github/workflows/test-dispatcher.md
+++ b/.github/workflows/test-dispatcher.md
@@ -14,4 +14,11 @@ safe-outputs:
# Test Dispatcher Workflow
This workflow demonstrates the dispatch-workflow safe output capability.
-The agent can trigger the test-workflow using the test_workflow tool.
+
+## Instructions
+
+You have access to the `dispatch_workflow` safe output tool that can trigger workflows.
+
+**Your task**: Call the `dispatch_workflow` tool to trigger the `test-workflow` workflow.
+
+**Important**: You MUST use the safe output tool - do NOT write to files or attempt other methods.
--
2.52.0