You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
update_issue_labels is annotated destructiveHint: false but replaces (removes) existing labels #3760
The granular update_issue_labels tool sets destructiveHint: false. Its own description says "This replaces the current labels with the provided list", and that is what it does: labels not in the list are removed. A host that keys confirmation on destructiveHint may not prompt for a call that removes labels.
This is the opposite of #3281 / PR #3293, which are about additive tools that omit the hint. Here the hint is explicitly false on a tool that removes data. Open PR #2742 adds method: replace|add|remove but keeps replace as the default and does not change the annotation. update_issue_assignees uses the same annotation and the same replace pattern (issues_granular.go:238). That one was not tested live.
A previous PR, #2471, which marked the granular update_issue_* tools destructive for client egress policy, was closed unmerged. This issue is narrower: it concerns only the two replace-semantics tools, where the description and the annotation disagree.
The tool is behind the issues_granular feature flag, and this is an annotation-accuracy item only. To enable it, start the server with --features=issues_granular, which swaps the consolidated issue_write for the granular issue tools.
Code (main 99d6d65, unchanged since v2.1.0): pkg/github/issues_granular.go:368-375 (update_issue_labels, DestructiveHint: new(false) at :373).
Affected version
v2.1.0 (image sha256:f6056fc1…0f8a, commit 4bcdcdf) and main nightly (image sha256:48bc16d0…338f, revision 99d6d65), both with --features=issues_granular.
Result: success. Labels are now [a]: c and d were removed.
Expected vs actual behavior
Expected: a tool that can remove labels is annotated destructiveHint: true, or omits the hint, which defaults to true.
Actual: destructiveHint: false.
Suggested fix: set DestructiveHint: new(true) on update_issue_labels (and update_issue_assignees) while replace is possible. Annotations are static, so this holds even if PR #2742 adds non-destructive methods.
Logs
annotations: {"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Update Issue Labels"}
labels before [c, d] -> update_issue_labels labels=["a"] -> OK -> labels after [a] (v2.1.0 and main)
Found during an independent audit of v2.1.0 on a throwaway org and private test repo. Prepared with AI assistance (Claude Code); reproduced by two independent test runs before filing.
Thanks to both of you. I read #3791 and #3800 against the report. This is from reading the diffs, not a test run.
Both set DestructiveHint: true on update_issue_labels and update_issue_assignees and update the two tool snapshots, so tools/list would now report destructiveHint: true for the replace call in the repro. The code changes are the same. #3791 was opened first, and its test also checks that the descriptions still document the replace behaviour. Either one closes this, so only one needs to land.
Activity
rafe-walker commentedon Nov 12, 2026
Thanks to both of you. I read #3791 and #3800 against the report. This is from reading the diffs, not a test run.
Both set
DestructiveHint: trueonupdate_issue_labelsandupdate_issue_assigneesand update the two tool snapshots, sotools/listwould now reportdestructiveHint: truefor the replace call in the repro. The code changes are the same. #3791 was opened first, and its test also checks that the descriptions still document the replace behaviour. Either one closes this, so only one needs to land.Happy to re-check
tools/listonce one is merged.feat(issues): add method option to update_issue_labels