Repository navigation
Fix issue-triage-agent: correct MCP tool name and read issue from payload - #67962
Merged
DeagleGross merged 1 commit intoJul 22, 2026
Merged
Conversation
…load The issue-triage-agent workflow was failing to read the triggering issue. Two prompt-level problems are fixed here: 1. Tool name mismatch: the prompt told the agent to use `get_issue`, but github-mcp-server (v1.6.0) exposes this tool as `issue_read`. The agent searched for a non-existent tool and wasted time. All references are updated to `issue_read`. 2. Read the issue from the event payload first. For `issues.opened` runs the issue title and body are already delivered in the event context, so the agent no longer needs any GitHub MCP / network call to read them. The sanitized title and body are now injected directly into the prompt (`steps.sanitized.outputs.title` / `.body`). The `issue_read` MCP tool is used only as a fallback (e.g. `workflow_dispatch`, which carries no issue payload), and the prompt explicitly forbids falling back to `gh`, `curl`, or `node`. Recompiled issue-triage-agent.lock.yml with gh-aw v0.82.13 (the version the repo is pinned to) so the setup action SHA pin and all other workflows are left unchanged. Note: this does not address run-level infrastructure failures seen in CI (a firewall block on MCP CLI network egress, tracked in github/gh-aw#46826 / gh-aw-firewall#6473, and an authentication_failed 401 from a bad PAT in the COPILOT_PAT pool). Those are environment issues outside this workflow file. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac9f9d5e-5b4e-4994-a60b-ed01b52cf97f
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the issue-triage-agent workflow prompt/compilation so the agent reliably reads the triggering issue (preferably from the event payload) and uses the correct GitHub MCP tool name when a fallback fetch is required.
Changes:
- Switch prompt guidance from the nonexistent
get_issuetool to theissue_readMCP tool for fallback reads. - Prefer the workflow event payload for
issues.openedby injecting sanitized issue title/body into the prompt and instructing the agent to skip MCP in that case. - Recompile the lock workflow to wire
steps.sanitized.outputs.title/bodyinto prompt interpolation.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/issue-triage-agent.md | Updates the agent prompt to prefer event payload + correct MCP tool name (issue_read) for fallback. |
| .github/workflows/issue-triage-agent.lock.yml | Recompiled workflow wiring new sanitized outputs into the prompt rendering steps. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
| values below as the source of truth for the title and body: | ||
|
|
||
| Read the full issue title and body using the GitHub MCP Server tools: | ||
| - **Number:** #${{ github.event.issue.number }} |
wtgodbe
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
issue-triage-agentworkflow was consistently failing to read the triggering issue. Two prompt-level bugs are fixed here.1. Wrong MCP tool name (
get_issue→issue_read)The prompt instructed the agent to fetch issues with a
get_issuetool, butgithub-mcp-server(v1.6.0, the version pinned in the lock file) exposes this operation asissue_read. The agent searched for a tool that doesn't exist, failed to find it, and wasted a significant chunk of the run before giving up. All references are updated toissue_read.2. Read the issue from the event payload first
For
issues.openedruns, the issue title and body are already delivered in the workflow event context — no GitHub MCP call or network egress is needed to read them. The prompt now injects the sanitized title and body directly (steps.sanitized.outputs.title/.body) and tells the agent to use them as the source of truth and skip the MCP fetch entirely.The
issue_readMCP tool is kept strictly as a fallback for cases with no issue payload (e.g.workflow_dispatch, where the issue number comes from an input). The prompt also explicitly forbids shelling out togh,curl, ornodeto read the issue.This makes the common
issues.openedpath independent of MCP/network availability, which is relevant given the intermittent firewall/egress failures seen in CI.Compilation
issue-triage-agent.lock.ymlwas recompiled with gh-aw v0.82.13 — the exact version this repo is currently pinned to — so the only changes are the ones driven by the prompt edit (the newsteps.sanitized.outputs.*wiring). Thegithub/gh-aw-actions/setupSHA pin and every other workflow are left untouched.Out of scope (not fixed here)
Two failures observed in recent runs are environment/infrastructure issues, not workflow-file bugs, and are intentionally not addressed by this PR:
authentication_failedHTTP 401 from a bad/expired PAT in theCOPILOT_PATpool.