From 47a9199c983393c1210915ead1a7e1afde287c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Mon, 13 Jul 2026 11:32:46 +0200 Subject: [PATCH] fix(agents): add confirmation gate to triage-issue batch mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Batch triage previously processed all state:triage-needed issues immediately without any confirmation. This led to accidental mass-commenting (29 triage comments on a public repo) when the skill was invoked by mistake. Add a mandatory preview-and-confirm step: the agent must show the issue count and titles, then ask for explicit user confirmation before posting any comments. Single-issue mode is unchanged. Assisted-By: 🤖 Claude Code Signed-off-by: Roland Huß --- .agents/skills/triage-issue/SKILL.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.agents/skills/triage-issue/SKILL.md b/.agents/skills/triage-issue/SKILL.md index 8d602a9023..ec9858a59d 100644 --- a/.agents/skills/triage-issue/SKILL.md +++ b/.agents/skills/triage-issue/SKILL.md @@ -45,13 +45,29 @@ Assess one specific issue. Proceed to Step 1 with the given issue number. triage issues ``` -Query all open issues with the `state:triage-needed` label and process them in sequence: +Batch mode requires a confirmation gate before processing. This prevents accidental mass-commenting on a public repository. + +**Step 1: Preview.** Query all matching issues and display a summary: ```bash -gh issue list --label "state:triage-needed" --state open --json number,title --jq '.[].number' +gh issue list --label "state:triage-needed" --state open --json number,title --jq '.[] | "#\(.number) \(.title)"' +``` + +Present the results to the user: + ``` +Found N issues with state:triage-needed: + + #250 Bug: sandbox fails to start with VM driver + #312 Feature: add --output yaml to sandbox list + ... (show up to 10, then "and N more") + +This will post a triage comment on each issue. +``` + +**Step 2: Confirm.** Ask the user for explicit confirmation before proceeding. Use `AskUserQuestion` with options "Proceed with all N issues", "Let me pick specific issues", and let them provide custom input. Do **not** proceed without confirmation. -For each issue returned, run the full triage workflow (Steps 1-7). Report a summary at the end listing each issue and its classification. +**Step 3: Process.** Only after confirmation, run the full triage workflow (Steps 1-7 below) for each issue. Report a summary at the end listing each issue and its classification. ## Step 1: Fetch the Issue