Skip to content

Issue triage agent: require issue_read when the event payload is empty - #67985

Merged
DeagleGross merged 1 commit into
dotnet:mainfrom
DeagleGross:deaglegross-triage-agent-require-issue-read
Jul 23, 2026
Merged

DeagleGross merged 1 commit into
dotnet:mainfrom
DeagleGross:deaglegross-triage-agent-require-issue-read

Conversation

@DeagleGross

Copy link
Copy Markdown
Member

What this changes

The issue-triage agent prompt treated the sanitized event payload as the source of truth and the GitHub MCP issue_read tool as an optional "fallback, only when the payload is unavailable."

The problem: for issues opened by non-collaborators (the majority of triage targets), the event payload is intentionally blanked by the security sanitizer. The agent then saw an empty title/body and reported missing_data / noop without ever attempting to read the issue — producing green runs that never actually triaged anything.

This PR reframes an empty payload as the expected signal to fetch the issue, and:

  • makes the issue_read MCP call required (not an optional fallback) when the payload is empty,
  • explicitly forbids reporting missing data / calling noop / giving up before a successful issue_read,
  • keeps the existing rule against gh / curl / shell fallbacks.

It's a prompt-only change (plus the recompiled .lock.yml body_hash). No workflow logic, permissions, or tools change.

Verification

I ran the updated workflow 4× against issue #67980 (dry-run). In every run the agent now calls issue_read first, instead of bailing out early:

✗ github tool: "issue_read", input: {"owner": "dotnet", "repo": "aspnetcore", "issue_number": 67980}

Test runs:

⚠️ Known blocker — this won't fully work until github/gh-aw#46826 ships

The same test runs also show that the workflow cannot complete a triage today, for a reason unrelated to this prompt: the GitHub MCP tools register on the MCP gateway but never reach the Copilot CLI. The agent's own logs:

└ Tool 'github' does not exist.

"The GitHub MCP server tools (like issue_read) are not available in this environment"

This is tracked upstream as github/gh-aw#46826. Until it is fixed and released, the agent physically cannot call issue_read, so triage keeps failing regardless of this change.

Why merge this anyway: this PR is the complementary fix. Without it, the agent gives up on an empty payload even when the MCP is healthy; with it, the agent will correctly read and triage the issue as soon as #46826 is resolved. The two together are what make external-contributor issues triage reliably.

Risk

Low — prompt text only, recompiled with gh aw v0.82.13 (same compiler already in the repo). Auth is unaffected (all four runs above authenticated successfully).

The triage prompt treated the sanitized event payload as the source of
truth and issue_read as a fallback 'only when the payload is unavailable'.
For issues opened by non-collaborators the payload is deliberately blanked
by the security sanitizer, so the agent saw an empty title/body and
reported missing_data instead of reading the issue - producing green runs
that never triaged the issue.

Reframe an empty payload as the expected signal to call issue_read, make
that MCP call required, and forbid reporting missing data / noop / giving
up before a successful issue_read.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 3995edd8-d40d-471c-9bc5-d804b9b2e691
Copilot AI review requested due to automatic review settings July 23, 2026 17:33
@DeagleGross
DeagleGross requested review from a team and wtgodbe as code owners July 23, 2026 17:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the issue-triage agent workflow prompt to treat an empty/sanitized issue payload as an expected condition (especially for non-collaborator issues) and to require reading the issue via the GitHub MCP issue_read tool before proceeding.

Changes:

  • Require issue_read when the payload title/body are empty, and forbid bailing out (noop / “missing data”) before attempting it.
  • Expand prompt guidance to explain why payloads may be empty (workflow_dispatch and sanitized non-collaborator issues).
  • Recompile the generated .lock.yml to reflect the prompt update (body_hash change only).
Show a summary per file
File Description
.github/workflows/issue-triage-agent.md Prompt updated to require issue_read when payload is empty and to prevent early “give up” paths.
.github/workflows/issue-triage-agent.lock.yml Auto-generated workflow recompiled; metadata hash updated accordingly.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment on lines +138 to +142
- Call `issue_read` with owner `dotnet`, repo `aspnetcore`, and issue number
`${{ github.event.issue.number || github.event.inputs.issue_number }}`.
- This `issue_read` call is **required, not optional.** An empty payload is never a
reason to stop: do **not** report missing data, do **not** call `noop`, and do
**not** give up before you have successfully called `issue_read`.
@DeagleGross
DeagleGross enabled auto-merge (squash) July 23, 2026 17:39
@DeagleGross
DeagleGross merged commit 2af03c1 into dotnet:main Jul 23, 2026
44 checks passed
@DeagleGross
DeagleGross deleted the deaglegross-triage-agent-require-issue-read branch July 23, 2026 17:59
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Jul 24, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — a9a9ae32 Deployed Jul 23, 2026 by DeagleGross via conclusion #744
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.

3 participants