Skip to content

Commit cd27a87

Browse files
fix: improve issue-triage prompt robustness to prevent no-output failures (#10504)
Agentic Triage workflow ([run 24996553319](https://github.com/microsoft/typespec/actions/runs/24996553319)) produced no safe outputs despite the agent running for ~4 minutes. This is the second failure after PR #10502 fixed tool name references — the agent still silently failed to call any safe output tool. Analysis of the generated prompt and MCP gateway logs revealed three issues: - **Missing `get_file_contents` tool reference**: The prompt said "read the file `eng/common/config/labels.ts`" without specifying the MCP tool name or parameters. Now explicitly references `get_file_contents` with `owner`/`repo`. - **Unconditional `web-fetch` reference**: The prompt unconditionally instructed the agent to "Use `web-fetch` to verify the playground link", but only `safeoutputs` and `github` MCP servers were registered — `web-fetch` was not available. Changed to conditional: "If the `web_fetch` tool is available, use it to verify..." - **No fallback instruction**: Added an explicit `## Important` section reinforcing the requirement to call at least one safe output tool (`add_comment`, `add_labels`, or `noop`) before finishing, with guidance to call `noop` on errors. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
1 parent b2fa417 commit cd27a87

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/workflows/issue-triage.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You're a triage assistant for the TypeSpec GitHub repository. Your task is to an
4848

4949
## Available Labels
5050

51-
To find the available labels for this repository, read the file `eng/common/config/labels.ts` in the repository. This file contains all the label definitions organized by category:
51+
To find the available labels for this repository, use the `get_file_contents` tool to read the file `eng/common/config/labels.ts` (owner: `microsoft`, repo: `typespec`). This file contains all the label definitions organized by category:
5252

5353
- **Area labels** (`AreaLabels`): Used to categorize which area of the codebase the issue belongs to (e.g. `compiler:core`, `emitter:openapi3`, `ide`, etc.). Always try to assign the most specific area label that matches.
5454
- **Issue kind labels** (`issue_kinds`): Used to classify the type of issue (`bug`, `feature`, `docs`).
@@ -104,7 +104,7 @@ Only use labels defined in that file.
104104
- Do NOT change the semantics of the reproduction
105105

106106
**Construct a playground link**: If the issue has reproduction TypeSpec code but no playground link, construct one using this URL format:
107-
`https://typespec.io/playground?c={encoded}` where `{encoded}` is the repro code URL-encoded (percent-encoded). Use `web-fetch` to verify the playground link works by fetching it.
107+
`https://typespec.io/playground?c={encoded}` where `{encoded}` is the repro code URL-encoded (percent-encoded). If the `web_fetch` tool is available, use it to verify the playground link works by fetching it.
108108

109109
Skip this step entirely for feature requests and documentation issues.
110110

@@ -143,3 +143,7 @@ Only use labels defined in that file.
143143
- Skip the reproduction block entirely for feature requests and docs issues
144144
- Skip "Suggested next steps" if there's nothing actionable to suggest
145145
- Do NOT include any text about agentic workflows, how to install them, or any self-promotional content. Do NOT mention AI, bots, or agents.
146+
147+
## Important
148+
149+
You MUST call at least one safe output tool (`add_comment`, `add_labels`, or `noop`) before finishing. If you encounter errors with any tool or cannot complete the triage, call `noop` with a message describing what went wrong.

0 commit comments

Comments
 (0)