Skip to content

fix: propagate assign_copilot_to_created_issues failure to agent failure issue/comment#22371

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-agent-failure-propagation
Mar 23, 2026
Merged

fix: propagate assign_copilot_to_created_issues failure to agent failure issue/comment#22371
pelikhan merged 2 commits intomainfrom
copilot/update-agent-failure-propagation

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

When assign_copilot_to_created_issues fails (e.g., Bad credentials), the safe_outputs job crashes but the conclusion job has no visibility into why — no failure context appears in the agent failure issue/comment.

Changes

assign_copilot_to_created_issues.cjs

  • Replace core.setFailed() with core.setOutput() + core.warning(), mirroring the pattern in assign_to_agent.cjs
  • Outputs: assign_copilot_failure_count, assign_copilot_errors (format: issue:<number>:copilot:<error>)

Compiler (compiler_safe_outputs_job.go + notify_comment.go)

  • Add id: assign_copilot_to_created_issues + continue-on-error: true to the step so outputs survive failure
  • Wire outputs to the safe_outputs job outputs
  • Pass GH_AW_ASSIGN_COPILOT_FAILURE_COUNT / GH_AW_ASSIGN_COPILOT_ERRORS env vars to handle_agent_failure in the conclusion job — only when create-issue: assignees: copilot is configured

handle_agent_failure.cjs

  • Add buildAssignCopilotFailureContext() — reads assign_copilot_to_created_issues_failure.md template, formats per-issue errors
  • Include hasAssignCopilotFailures in the proceed-with-failure-handling condition
  • Inject {assign_copilot_failure_context} into both issue and comment template contexts

New template: actions/setup/md/assign_copilot_to_created_issues_failure.md

Explains the failure, common causes (GH_AW_AGENT_TOKEN missing/expired, insufficient permissions, no Copilot subscription), and remediation.

Templates + lock files

  • Added {assign_copilot_failure_context} placeholder to agent_failure_issue.md and agent_failure_comment.md
  • Recompiled all 177 workflow lock files

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/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw h06Zp71YNWHs (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD erignore ache/go/1.25.0/xGO111MODULE env 4799401/b401/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile /usr/bin/git 3 GO111MODULE cfg git rev-�� --show-toplevel go /usr/bin/git 1b-F/LBZhvavch60git GO111MODULE (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel node /usr/bin/git --check scripts/**/*.js 64/bin/go git rev-�� --git-dir go /usr/bin/git -json GO111MODULE 64/bin/go /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha 817691/b436/stringutil.test GO111MODULE 817691/b436/importcfg.link GOINSECURE GOMOD GOMODCACHE vsiWHJxF12LLI/8MBkAlss8NoqMJPDT0us/3YdcVDbgE0y5Gdx8vjli/alK5YuEvsiWHJxF12LLI -ato�� ithub-script/git/ref/tags/v8 -buildtags 817691/b436/_pkg_.a -errorsas -ifaceassert -nilfunc git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE test GOINSECURE GOMOD GOMODCACHE test (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha GOMODCACHE go /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE At,event,headBra--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go n-dir/node -json GO111MODULE 817691/b409/cons--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha user.name Test User /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260323-043533-30858/test-1370321133 rev-parse /usr/bin/git @{u} **/*.cjs 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha add origin /usr/bin/git d GO111MODULE 64/bin/go git rev-�� --show-toplevel node /usr/bin/git prettier --check 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE env 4799401/b416/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/mathenv GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha 4799401/b374/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ZSKO/TTXb2r0C8C-GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 4799401/b374/impTest User (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --get remote.origin.url (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha add origin /usr/bin/git -json GO111MODULE 64/bin/go git comm�� -m Add workflow /usr/bin/git --check **/*.cjs 64/bin/go git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha /actions/secrets GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env runs/20260323-043533-30858/test-3454690239/.github/workflows GO111MODULE /bin/sh l GOMOD GOMODCACHE /bin/sh (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env k/gh-aw/gh-aw GO111MODULE ache/node/24.14.0/x64/bin/node GOINSECURE GOMOD GOMODCACHE git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env k/gh-aw/gh-aw/.github/workflows GO111MODULE /usr/bin/git GOINSECURE GOMOD GOMODCACHE git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 git me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } GOMODCACHE go ache/node/24.14./tmp/gh-aw-test-runs/20260323-043818-35748/test-4144364279 git rev-�� --show-toplevel ache/node/24.14.0/x64/bin/node /usr/bin/tr ere /tmp/go-build841rev-parse /usr/bin/git tr (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE HC/wPHmRHH07drGoTest User (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 git /usr/bin/git --show-toplevel go /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.0/x-test.run=^Test /usr/bin/git /tmp/go-build841git -importcfg /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 git /usr/bin/git GOMODCACHE go /opt/hostedtoolc/tmp/gh-aw-test-runs/20260323-043818-35748/test-4144364279 git rev-�� --show-toplevel node /usr/bin/git /tmp/TestHashStagit sh /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 git /usr/bin/git --show-toplevel go ache/node/24.14./tmp/gh-aw-test-runs/20260323-043818-35748/test-4144364279 git rev-�� --show-toplevel ache/node/24.14.0/x64/bin/node /usr/bin/find ub.actor }} sh /usr/bin/git find (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE s9ZXZGY/X4XoDkfiiEtxJ64HjgrP env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 git /usr/bin/git --show-toplevel (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 git /usr/bin/git GOMODCACHE go ache/node/24.14..github/workflows/test.md git rev-�� --show-toplevel ache/node/24.14.0/x64/bin/node /usr/bin/bash /tmp/TestHashStagit sh /usr/bin/git bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 git /usr/bin/git --show-toplevel go ache/node/24.14.--git-dir git rev-�� --show-toplevel ache/node/24.14.0/x64/bin/node /usr/bin/find --show-toplevel sh /usr/bin/git find (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE node /opt�� run lint:cjs 64/bin/go GOSUMDB GOWORK 64/bin/go sh (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env y_only_defaults_repo3969178214/001 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh -c npx prettier --c-errorsas GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel 3a/2xPkwcW7pVVcgea6hmM0/paC3JcqppU3asz43gUvi k -json GO111MODULE 39e3d0057da5eb36--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE npx pret�� --check **/*.cjs 64/bin/go **/*.json --ignore-path ../../../.pretti--show-toplevel node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path golangci-lint (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json l /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env y_with_explicit_repo3929208482/001 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion xterm-color VNgnGPLEQds7 /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel node /usr/bin/git git (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD erignore go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD ode-gyp-bin/node-json go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git -json GO111MODULE (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build841817691/b400/cli.test /tmp/go-build841817691/b400/cli.test -test.testlogfile=/tmp/go-build841817691/b400/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD ode-gyp-bin/node-json ache/go/1.25.0/xGO111MODULE env 4799401/b375/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/pkg/mathenv GOMODCACHE go (http block)
    • Triggering command: /tmp/go-build2580127387/b400/cli.test /tmp/go-build2580127387/b400/cli.test -test.testlogfile=/tmp/go-build2580127387/b400/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true pts.test GO111MODULE rtcfg.link git rev-�� --show-toplevel U8IGZ3xsiiK_VzgSGT/jqXiqKS2mm7rG7KRlb0f/T36gUPQZXFjOiSQ6baL5 /usr/bin/git 3533-30858/test-git GO111MODULE _.a git (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD erignore ache/go/1.25.0/xGO111MODULE env 4799401/b436/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE b/gh-aw/scripts GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel 817691/b001/gh-aw.test /usr/bin/git t0 GO111MODULE (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…ure issue/comment

When the Assign Copilot to created issues step fails (e.g. Bad credentials),
the failure is now propagated to the agent failure issue/comment via:

- New actions/setup/md/assign_copilot_to_created_issues_failure.md template
  with a clear explanatory note about common causes and remediation steps
- assign_copilot_to_created_issues.cjs: set outputs (assign_copilot_failure_count,
  assign_copilot_errors) and use core.warning() instead of core.setFailed()
- compiler: add id/continue-on-error to step, wire outputs to safe_outputs job
- notify_comment.go: pass new outputs as env vars to handle_agent_failure step
- handle_agent_failure.cjs: read env vars, build context from template, include
  in both issue and comment bodies via {assign_copilot_failure_context} placeholder

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/369a6921-76dc-4239-ac69-444f8c4b92cd
Copilot AI changed the title [WIP] Add failure to assign propagation to agent issue fix: propagate assign_copilot_to_created_issues failure to agent failure issue/comment Mar 23, 2026
Copilot AI requested a review from pelikhan March 23, 2026 04:47
@pelikhan pelikhan marked this pull request as ready for review March 23, 2026 05:00
Copilot AI review requested due to automatic review settings March 23, 2026 05:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves observability for failures that occur while assigning the Copilot coding agent to issues created by safe-outputs, ensuring failure details survive into the conclusion job and are surfaced in the agent failure issue/comment.

Changes:

  • Emit assign_copilot_failure_count / assign_copilot_errors from the Copilot-assignment step and propagate them through safe_outputs job outputs.
  • Wire those outputs into the conclusion job env so handle_agent_failure.cjs can render a new Copilot-assignment failure context block into failure issue/comment templates.
  • Add a new markdown template explaining common causes/remediation, and recompile workflow lock files to include the new wiring.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/workflow/compiler_safe_outputs_job.go Adds step id + continue-on-error and exposes Copilot-assignment outputs at the safe_outputs job level.
pkg/workflow/notify_comment.go Passes Copilot-assignment failure outputs from needs.safe_outputs.outputs.* into handle_agent_failure via env vars (when configured).
pkg/workflow/compile_outputs_issue_test.go Extends lockfile compilation test to assert the new step id, continue-on-error, and exported outputs.
actions/setup/js/assign_copilot_to_created_issues.cjs Switches from failing the step to emitting outputs + warning so the conclusion job can report details.
actions/setup/js/handle_agent_failure.cjs Adds buildAssignCopilotFailureContext() and injects {assign_copilot_failure_context} into templates when failures exist.
actions/setup/md/assign_copilot_to_created_issues_failure.md New template describing Copilot assignment failures and remediation steps.
actions/setup/md/agent_failure_issue.md Adds {assign_copilot_failure_context} placeholder to the failure issue template.
actions/setup/md/agent_failure_comment.md Adds {assign_copilot_failure_context} placeholder to the failure comment template.
.github/workflows/duplicate-code-detector.lock.yml Recompiled lockfile reflecting new safe_outputs outputs + conclusion env vars and step metadata.
.github/workflows/daily-doc-healer.lock.yml Recompiled lockfile reflecting new safe_outputs outputs + conclusion env vars and step metadata.
.github/workflows/breaking-change-checker.lock.yml Recompiled lockfile reflecting new safe_outputs outputs + conclusion env vars and step metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// Fail if any assignments failed
// Set outputs for the conclusion job to report failures in the agent failure issue/comment
const assignCopilotErrors = failedResults.map(r => `issue:${r.issue_number}:copilot:${r.error}`).join("\n");
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assign_copilot_errors currently encodes failures as issue:<number>:copilot:<error> (no repository), but issues_to_assign_copilot supports cross-repo entries (owner/repo:number). If multiple repos are involved, the failure context rendered in handle_agent_failure becomes ambiguous (issue numbers aren’t globally unique) and can mislead remediation. Consider including the repo slug in the output format (and updating the parser/formatter in handle_agent_failure.cjs and the markdown template accordingly).

Suggested change
const assignCopilotErrors = failedResults.map(r => `issue:${r.issue_number}:copilot:${r.error}`).join("\n");
// Include the repository slug so failures are unambiguous across multiple repositories.
const assignCopilotErrors = failedResults.map(r => `issue:${r.repo}#${r.issue_number}:copilot:${r.error}`).join("\n");

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit 41b03c5 into main Mar 23, 2026
61 checks passed
@pelikhan pelikhan deleted the copilot/update-agent-failure-propagation branch March 23, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants