Improve Copilot agent assignment failure comment with progressive disclosure and precise errors#22664
Closed
Improve Copilot agent assignment failure comment with progressive disclosure and precise errors#22664
Conversation
…precise errors, and run link Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/9cfccf8b-4a14-437f-9eab-7310b4ff2df0
Copilot
AI
changed the title
[WIP] Improve assign to agent failure comment
Improve Copilot agent assignment failure comment with progressive disclosure and precise errors
Mar 24, 2026
Copilot stopped work on behalf of
pelikhan due to an error
March 24, 2026 12:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 failure comment when the workflow can't assign the Copilot coding agent was generic and unhelpful — no run link, no manual assignment instructions, and no error-type-specific guidance.
Changes
Progressive disclosure via
<details>sections — three collapsible sections replace the flat text:gh issue edit <n> --add-assignee copilot-swe-agentcommands and UI instructions naming the specific agentERR_PERMISSION/not available→ agent not enabled, links to Settings → CopilotForbidden/Insufficient permissions/Resource not accessible→ token misconfiguration withgh aw secrets setremediationRun link footer — appends
> [View workflow run #<id>](<url>)whenrunUrlis available, satisfying the "generated by" requirementMoved from template file to inline JS —
buildAssignCopilotFailureContext()now builds the body directly (same pattern asbuildCodePushFailureContext) rather than delegating to the now-deletedassign_copilot_to_created_issues_failure.mdtemplate; acceptsrunUrlas a new optional third parameterCall sites updated — both invocations in
main()now passrunUrl15 new unit tests covering empty input, availability errors, permission errors, generic errors, multiple issues, and run URL variants
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js -m de/node/bin/git git comm�� '/tmp/push-signed-bare-hGsbmN' '/tmp/push-signed-bare-hGsbmN' es/.bin/git --name-status aaaae4e226f65c21rev-parse b7e6705f git(http block)invalid.example.invalid/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git add ental-rRXw8w git es/.bin/git modules/@npmcli/git git e_modules/.bin/g-u git rev-�� --count origin/auth-cleanup-success..auth-cleanup-success _modules/.bin/git -M ch es/.bin/git git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.