GitHub Agentic Workflows failing to consistently call dispatch workflow
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 144
Description
The [Pipeline Analysis Next Steps](https://github.com/Azure/azure-sdk-for-python/blob/main/.github/workflows/pipeline-analysis-next-steps.md) workflow does not call the dispatch_workflow safe outputs step consistently. Instead, it calls the workflow name, which is turned into a MCP tool at runtime. As shown here: https://github.com/Azure/azure-sdk-for-python/actions/runs/33844761842/job/100935717375#process-safe-outputs
Log failure in safe output job:
```
Error: Failed to dispatch workflow "pipeline-analysis-auto-fix": Required input 'ci_head_sha' not provided - https://docs.github.com/rest/actions/workflows#create-a-workflow-dispatch-event
Error: ✗ Message 3 (dispatch_workflow) failed: Failed to dispatch workflow "pipeline-analysis-auto-fix": Required input 'ci_head_sha' not provided - https://docs.github.com/rest/actions/workflows#create-a-workflow-dispatch-event
```
Agent logs showcasing calling the wrong tool:
```
● dispatch_workflow (MCP: safeoutputs)
└ {"result":"Safe-job 'dispatch_workflow' executed successfully with arguments:...
● pipeline_analysis_auto_fix (MCP: safeoutputs) · ci_head_sha: "b33eecf66c6795359bd8d936bda40feb651…
└ {"result":"success"}
```
dispatch_workflow has empty required parameters:
```
{
"name": "safeoutputs-dispatch_workflow",
"namespacedName": "safeoutputs/dispatch_workflow",
"source": "mcp",
"title": "dispatch_workflow",
"description": "[safeoutputs] Custom safe-job: dispatch_workflow",
"input_schema": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"mcpServerName": "safeoutputs",
"mcpToolName": "dispatch_workflow",
"safeForTelemetry": {
"name": false,
"inputsNames": false
}
}
```
And at runtime, GH AW, creates a new safe output tool, instead of using the dispatch_workflow tool:
```
{
"name": "safeoutputs-pipeline_analysis_auto_fix",
"namespacedName": "safeoutputs/pipeline_analysis_auto_fix",
"source": "mcp",
"title": "pipeline_analysis_auto_fix",
"description": "[safeoutputs] Dispatch the 'pipeline-analysis-auto-fix' workflow with workflow_dispatch trigger. This workflow must support workflow_dispatch and be in .github/workflows/ directory in the same repository. Use the 'ref' parameter to target a specific branch or tag (allowed patterns: refs/heads/main).",
"input_schema": {
"additionalProperties": false,
"properties": {
"aw_context": {
"default": "",
"description": "Agent caller context (used internally by Agentic Workflows).",
"type": "string"
},
"ci_head_sha": {
"description": "Failed pull request commit",
"type": "string"
},
"parent_run_id": {
"description": "Trigger run that requested this fix",
"type": "string"
},
"pr_number": {
"description": "Pull request number to fix",
"type": "string"
},
"ref": {
"description": "The git ref (branch, tag, or SHA) to dispatch the workflow on. Must match one of the configured allowed ref patterns: refs/heads/main. If omitted, the dispatching workflow's ref is used.",
"type": "string"
}
},
"required": [
"ci_head_sha",
"parent_run_id",
"pr_number"
],
"type": "object"
},
"mcpServerName": "safeoutputs",
"mcpToolName": "pipeline_analysis_auto_fix",
"safeForTelemetry": {
"name": false,
"inputsNames": false
}
}
```
We should try moving Copilot requests to the Copilot SDK within the azsdk tool. This allows for more deterministic infrastructure to be built around the model's inputs and outputs.
Contributor guide
Assessment
This issue has not been assessed yet.