ci: add tool constraints to pr-severity prompt #10550
Merged
+12
−0
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.
The pr-severity workflow has been posting severity classification comments on PRs but never actually applying the labels. Every single run shows the same pattern: Claude tries to use
gh apito add labels, the allowed tools restriction correctly denies it, but then Claude silently gives up instead of retrying with the permittedgh pr edit --add-labelcommand.You can see this across multiple PRs -- #10529, #10472, #10538, #10540 all have severity comments but zero severity labels. The permission_denials array in the run output confirms
gh apiattempts were blocked each time.This adds an explicit "Tool Constraints" section at the top of the prompt that tells Claude upfront it only has
gh pr view,gh pr edit, andgh pr comment. By making the available tools clear before any instructions, Claude should usegh pr edit --add-labeldirectly instead of attemptinggh apifirst.Failed run that surfaced this: https://github.com/lightningnetwork/lnd/actions/runs/21614145381/job/62289184152