Skip to content

Fix ENOENT noise from unconditional agent-output env var and add pre-agent failure context to issue title#19505

Merged
pelikhan merged 6 commits intomainfrom
copilot/fix-enoent-errors-on-agent-output
Mar 4, 2026
Merged

Fix ENOENT noise from unconditional agent-output env var and add pre-agent failure context to issue title#19505
pelikhan merged 6 commits intomainfrom
copilot/fix-enoent-errors-on-agent-output

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

On pre-agent failures (sandbox crash, network timeout, etc.), the artifact download step silently fails but GH_AW_AGENT_OUTPUT is still set to a nonexistent path — causing downstream scripts to emit ENOENT errors. Additionally, all failure issues get the same generic [aw] <workflow> failed title, making pre-agent failures indistinguishable from mid-run failures.

Changes

  • artifacts.go — Added StepID field to ArtifactDownloadConfig. When set, emits id: <StepID> on the download step and gates the env-setup step with if: steps.<StepID>.outcome == 'success', so GH_AW_AGENT_OUTPUT is only set when the artifact actually landed.

    - name: Download agent output artifact
      id: download-agent-output
      continue-on-error: true
      uses: actions/download-artifact@...
    - name: Setup agent output environment variable
      if: steps.download-agent-output.outcome == 'success'
      run: |
        echo "GH_AW_AGENT_OUTPUT=..." >> "$GITHUB_ENV"
  • safe_outputs_steps.gobuildAgentOutputDownloadSteps() now passes StepID: "download-agent-output" to activate the conditional guard.

  • handle_agent_failure.cjs — Detects pre-agent failures (agentConclusion === "failure" AND GH_AW_AGENT_OUTPUT unset) and appends (pre-agent) to the issue title: [aw] <workflow> failed (pre-agent).

  • safe_output_helpers_test.go — Updated TestBuildAgentOutputDownloadSteps to assert the new step ID and outcome conditional are present.

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 8TXj5wgO48qQ (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 -pack /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw/main.go x_amd64/vet (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 add origin /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet .js&#39; --ignore-pagit 4307863/b213/vetrev-parse repository(owne--show-toplevel /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build649297531/b109/vet.cfg /usr/bin/git git status --porgit (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 297531/b411/_pkg_.a 64/pkg/tool/linurev-parse 297531/b411=&gt; json&#39; --ignore-pgit b/gh-aw/pkg/parsrev-parse $name) { has--show-toplevel git -C 6cTw/IXHo8h1anuDdIOk26cTw (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 run l /home/REDACTED/work/node_modules/.bin/sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolc-tests /usr/bin/git -unreachable=falgit /tmp/go-build281rev-parse e_modules/.bin/n--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcremote.origin.url /usr/bin/git ithub/workflows /tmp/go-build281rev-parse k/gh-aw/gh-aw/no--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha pload-artifact/git/ref/tags/v7 x_amd64/vet /usr/bin/git ithub/workflows --ignore-path 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 0643/001/stabiligit ../../../**/*.jsrev-parse /usr/bin/git 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 --show-toplevel ache/go/1.25.0/xrev-parse /usr/bin/git se 4307863/b089/vetrev-parse n-dir/node git conf�� user.email test@example.com ache/node/24.13.1/x64/bin/node se 4307863/b184/vetrev-parse ache/go/1.25.0/x--show-toplevel ache/node/24.13.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel ache/go/1.25.0/xconfig c647e9475b0835c482520f07ce983f3755baadeaf427a7a05ccf29818e5edccf-d se 4307863/b207/vetrev-parse 86_64/node git conf�� user.email test@example.com ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet se 4307863/b196/vetrev-parse de/node/bin/sh ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel ker/cli-plugins/docker-compose /usr/bin/git &#34;prettier&#34; --wrigit (http block)
  • https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha k/gh-aw/gh-aw/scremote.origin.url origin r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha linuxagent-logcoremote.origin.url origin ode_modules/.bin/sh yAccounting=yes ota=5% yHigh=170M 64/pkg/tool/linurev-parse git ../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore .cfg 64/pkg/tool/linux_amd64/link (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 ../pkg/workflow/remote.origin.url .cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 4307863/b028/vet.cfg r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build649297531/b395/importcfg -pack /tmp/go-build649297531/b395/_testmain.go tion�� -t security bin/sh OUTPUT -d 168.63.129.16 ache/go/1.25.0/x-importcfg (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 /tmp/gh-aw-test-runs/20260304-051012-15150/test-3819945091 config /usr/bin/git remote.origin.urgit (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 --get remote.origin.url /usr/bin/git se 4307863/b103/vetrev-parse .cfg git conf�� --get remote.origin.url /usr/bin/git se 4307863/b190/vetrev-parse repository(owne--show-toplevel 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 _.a x_amd64/vet 297531/b389/importcfg.link get --global DiscussionsEnabl--show-toplevel Pwhrn9NjtCOgd/QHSh_CNAe_Ew-jOFjQ4X/C061xVfYOKCjcTest User -C 8hwO9a820 l 1/x64/bin/node get .cfg 64/pkg/tool/linu--show-toplevel rtcfg (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha k/gh-aw/gh-aw/.github/workflows (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha ithub/workflows (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 h ../../../.pret.prettierignore (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 -buildtags me: String!) { repository(owne-buildmode=exe -errorsas -ifaceassert -nilfunc bash --no�� ithub/workflows 490052b2cdee6ca9967c0bf5:go.mod /opt/hostedtoolcache/node/24.13.1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/n/home/REDACTED/work/gh-aw/gh-aw/.github/workflows/blog-auditor.md ./../.prettieriggit (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 -buildtags /usr/bin/sed -errorsas -ifaceassert ode-gyp-bin/sh sed -ne ithub/workflows -tests iginal ./../.prettieriggit (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 -buildtags /usr/bin/sed -errorsas -ifaceassert -nilfunc sed -ne scripts synced successfully&#34; -tests /opt/hostedtoolcache/node/24.13.1/x64/lib/node_m-f ./../.prettieriggit (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 -buildtags repository(owner: $owner, name:-nilfunc -errorsas -ifaceassert ed } } ache/go/1.25.0/x64/pkg/tool/linuconfig --no�� --noprofile -tests me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } ./../.prettieriggit (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 -buildtags ache/go/1.25.0/x64/pkg/tool/linu-nilfunc -errorsas -ifaceassert -nilfunc ache/go/1.25.0/xTest User --no�� ty-test.md -tests /home/REDACTED/.local/bin/sh ./../.prettierignode (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 -buildtags ache/go/1.25.0/x64/pkg/tool/linu-nilfunc -errorsas -ifaceassert -nilfunc ache/go/1.25.0/x64/pkg/tool/linu-tests --no�� --noprofile -tests /opt/hostedtoolcache/uv/0.10.8/x86_64/sh ./../.prettieriggit (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 -buildtags me: String!) { -test.short=true -errorsas -ifaceassert -nilfunc bash --no�� ithub/workflows -tests /home/REDACTED/go/bin/sh ./../.prettieriggit (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path celain --ignore-remote.origin.url (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 (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 r ed } } x_amd64/vet -o ithub/workflows -trimpath (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha h ../../../.prettierignore VGUIDE.md modules/@npmcli/run-script/lib/node-gyp-bin/node (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 -bool on rkflow/js/**/*.json /../../.prettiergit erignore -nilfunc sh -c npx prettier --write &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.remote.origin.url -tests x_amd64/vet (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 */*.ts&#39; &#39;**/*.json&#39; --ignore-patremote.origin.url 4307863/b114/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (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 */*.ts&#39; &#39;**/*.json&#39; --ignore-patremote.origin.url 4307863/b091/vet.cfg 1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha */*.ts&#39; &#39;**/*.jsremote.origin.url 1nAi/Qt7LOO4MgTlX6D161nAi r: $owner, name: $name) { hasDiscussionsEnabled } } (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha */*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.prettierignore 4307863/b100/vet.cfg de/node/bin/sh (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 */*.ts&#39; &#39;**/*.js-f (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 ithub/workflows on rkflow/js/**/*.json /../../.prettiergit erignore -nilfunc s9ZXZGY/X4XoDkfitest@example.com -c 4103439654/.github/workflows -tests (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 -errorsas -ifaceassert -nilfunc bash --no�� stall-gh-aw.sh to actions/setup-cli/install.sh...&#34; -tests /home/REDACTED/work/gh-aw/gh-aw/actions/node_modules/.bin/node (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 ndor/bin/sh (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build649297531/b383/cli.test /tmp/go-build649297531/b383/cli.test -test.testlogfile=/tmp/go-build649297531/b383/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (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 celain --ignore-remote.origin.url (http block)

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

Original prompt

This section details on the original issue you should resolve

<issue_title>Unconditional agent-output artifact download causes ENOENT noise on pre-agent failures</issue_title>
<issue_description>## What happens

The safe-outputs job and conclusion job unconditionally add agent-output artifact download steps via buildAgentOutputDownloadSteps(). When the agent step fails before producing output (e.g., network failure, sandbox crash, permission error), the artifact doesn't exist. The download step is marked continue-on-error: true, so the job continues — but GH_AW_AGENT_OUTPUT is set to a path that doesn't exist. Downstream scripts that read that path emit ENOENT errors in the logs.

The failure issue title is always generic ([aw] <workflow> failed) with no pre-agent diagnostic context, making it hard to distinguish "agent never started" from "agent started and failed."

One improvement was landed recently: commit 31dc15f added inference-access-specific context in handle_agent_failure.cjs:461-468. But the broader pre-agent failure case (sandbox crash, network timeout, MCP server failure, etc.) still produces generic errors.

What should happen

  1. The download step's continue-on-error: true should be paired with a conditional check — downstream steps should skip when the artifact wasn't downloaded successfully
  2. GH_AW_AGENT_OUTPUT should only be set when the artifact actually exists
  3. Pre-agent failures should include the failure stage in the issue title (e.g., [aw] <workflow> failed (pre-agent) or [aw] <workflow> failed (sandbox setup))

Where in the code

All references are to main at 99b2107.

Unconditional download steps:

  • compiler_safe_outputs_job.go:53steps = append(steps, buildAgentOutputDownloadSteps()...)
  • notify_comment.go:57steps = append(steps, buildAgentOutputDownloadSteps()...) (conclusion job)

Download step with silent failure:

  • artifacts.go:44continue-on-error: true on the download step
  • artifacts.go:37-62buildAgentOutputDownloadSteps() sets env var regardless of download outcome

Downstream ENOENT paths:

  • load_agent_output.cjs:55-63 — reads process.env.GH_AW_AGENT_OUTPUT, attempts JSON.parse(fs.readFileSync(...)), catches ENOENT
  • noop.cjs:15-17 — calls loadAgentOutput(), returns silently on failure (no diagnostic)
  • notify_comment_error.cjs:79-88 — calls loadAgentOutput() in the error notification path

Generic failure title:

  • handle_agent_failure.cjs:593-596 — always uses [aw] <workflow> failed regardless of failure stage

Evidence

Source-level verification (2026-03-03):

  • Confirmed buildAgentOutputDownloadSteps() is called unconditionally at both call sites
  • Confirmed continue-on-error: true at artifacts.go:44
  • Confirmed no conditional guard on downstream env var usage

Local reproduction:

  • Ran noop.cjs with GH_AW_AGENT_OUTPUT pointing at a nonexistent file
  • Output: ENOENT error logged, then silent return — no indication of why the file is missing
  • Same behavior from notify_comment_error.cjs

Proposed fix

  1. In artifacts.go, add an id: to the download step and use a step outcome check (if: steps.<id>.outcome == 'success') on the env-setting step, so GH_AW_AGENT_OUTPUT is only set when the artifact was actually downloaded
  2. In handle_agent_failure.cjs, detect the failure stage (pre-agent vs. during-agent) by checking whether the agent-output artifact exists, and include this context in the failure issue title

Impact

Frequency: Every pre-agent failure. In our pipeline this occurs ~2-3 times per run batch when there are infrastructure issues (network, permissions, sandbox initialization).
Cost: Moderate — the ENOENT errors are noise in already-failing runs, but they obscure the real failure cause. The generic issue title means operators must dig into the full run log to determine whether the agent even started. Fixing this would significantly reduce triage time for pre-agent failures.</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.



✨ PR Review Safe Output Test - Run 22656383726

💥 [THE END] — Illustrated by Smoke Claude ·

- Add StepID field to ArtifactDownloadConfig; when set, adds `id:` to
  the download step and gates the env-setup step with
  `if: steps.<id>.outcome == 'success'` so GH_AW_AGENT_OUTPUT is only
  set when the artifact was actually downloaded
- Update buildAgentOutputDownloadSteps() to pass StepID: "download-agent-output"
- Detect pre-agent failures in handle_agent_failure.cjs (agent failed AND
  no artifact downloaded) and append (pre-agent) to the issue title
- Update TestBuildAgentOutputDownloadSteps to verify new step ID and conditional

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ENOENT errors from agent-output artifact downloads Fix ENOENT noise from unconditional agent-output env var and add pre-agent failure context to issue title Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Hey @Copilot 👋 — thanks for picking up issue #19474! The plan in this WIP PR is well-scoped and the root cause analysis is thorough. Here's what's needed to get this across the finish line:

  • Implementation not started yet — the initial planning commit has no code changes and all checklist items are unchecked. The core fixes still need to be implemented:

    • Add StepID field to ArtifactDownloadConfig in pkg/workflow/artifacts.go and wire up the id: YAML key on the download step
    • Add an if: steps.(id).outcome == 'success' conditional on the env-setup step inside buildArtifactDownloadSteps() so GH_AW_AGENT_OUTPUT is only written when the artifact was actually downloaded
    • Update buildAgentOutputDownloadSteps() in pkg/workflow/safe_outputs_steps.go to pass StepID: "download-agent-output"
    • Update handle_agent_failure.cjs around line 593-596 to detect pre-agent failures and include (pre-agent) in the issue title
  • Tests neededTestBuildAgentOutputDownloadSteps in pkg/workflow/safe_output_helpers_test.go currently asserts the old shape (no id:, no if: conditional). Update it to assert the new id: download-agent-output key on the download step and if: steps.download-agent-output.outcome == 'success' on the env-setup step. Follow the table-driven test patterns in scratchpad/testing.md.

  • Run make agent-finish before marking ready for review to confirm build, tests, lint, and recompile all pass.

If you'd like a hand, you can use this prompt with your coding agent:

Implement the fix for unconditional agent-output artifact download causing ENOENT noise (issue #19474).

Work in the gh-aw repository. All file references are to the current main branch.

## Changes required

### 1. pkg/workflow/artifacts.go — Add StepID field and conditional env-setup step

In `ArtifactDownloadConfig`, add a new field:
```go
StepID string // Optional step ID (e.g., "download-agent-output") — adds `id:` to the download step

In buildArtifactDownloadSteps():

  • If config.StepID != "", emit id: (StepID)\n immediately after the name: line of the download step
  • Change the env-setup step to emit if: steps.(StepID).outcome == 'success'\n before the run: line, but ONLY when config.StepID != ""

2. pkg/workflow/safe_outputs_steps.go — Pass StepID in buildAgentOutputDownloadSteps()

In buildAgentOutputDownloadSteps(), add StepID: "download-agent-output" to the ArtifactDownloadConfig literal.

3. actions/setup/js/handle_agent_failure.cjs — Pre-agent failure detection

Around line 593-596, where the failure issue title is built ([aw] failed), add logic to:

  • Check whether the agent-output artifact path (from GH_AW_AGENT_OUTPUT) exists on disk using fs.existsSync
  • If the file does NOT exist, append (pre-agent) to the title so it reads [aw] failed (pre-agent)

4. pkg/workflow/safe_output_helpers_test.go — Update TestBuildAgentOutputDownloadSteps

Update the expected components in TestBuildAgentOutputDownloadSteps to assert:

  • id: download-agent-output is present in the download step
  • if: steps.download-agent-output.outcome == 'success' is present in the env-setup step

Add a new test case (or sub-test) that calls buildArtifactDownloadSteps with StepID: "" to confirm that no id: or if: is emitted when StepID is empty (backward compatibility).

5. Finish

Run make agent-finish to validate build, tests, lint, recompile, and fmt all pass before committing.


> Generated by [Contribution Check](https://github.com/github/gh-aw/actions/runs/22656132065) · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw+%22gh-aw-workflow-call-id%3A+github%2Fgh-aw%2Fcontribution-check%22+in%3Acomments)

<!-- gh-aw-agentic-workflow: Contribution Check, engine: copilot, id: 22656132065, workflow_id: contribution-check, run: https://github.com/github/gh-aw/actions/runs/22656132065 -->

@pelikhan pelikhan marked this pull request as ready for review March 4, 2026 05:24
Copilot AI review requested due to automatic review settings March 4, 2026 05:24
@pelikhan pelikhan added the smoke label Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Commit pushed: 6e9315c

Generated by Changeset Generator

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq v4.52.4
curl 8.5.0
gh 2.87.3
node v20.20.0
python3 3.12.3
go 1.24.13
java 21.0.10
dotnet 10.0.102

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test ·

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

Fixes noisy ENOENT logs and improves failure-triage signal by only setting GH_AW_AGENT_OUTPUT when the agent-output artifact download actually succeeds, and by tagging pre-agent failures in the created issue title.

Changes:

  • Add optional StepID to artifact download step generation and gate env-var setup on steps.<id>.outcome == 'success'.
  • Update safe-outputs helpers/tests to assert the new step id and conditional.
  • Update failure issue title generation to append (pre-agent) when GH_AW_AGENT_OUTPUT is absent.

Reviewed changes

Copilot reviewed 163 out of 163 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/workflow/artifacts.go Adds StepID support and gates env-var setup on the download step outcome.
pkg/workflow/safe_outputs_steps.go Supplies StepID: download-agent-output for agent-output artifact download steps.
pkg/workflow/safe_output_helpers_test.go Extends tests to assert the step id and if: steps.<id>.outcome == 'success' guard.
actions/setup/js/handle_agent_failure.cjs Appends (pre-agent) to failure issue titles when GH_AW_AGENT_OUTPUT is unset.
.github/workflows/workflow-skill-extractor.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/workflow-normalizer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/workflow-health-manager.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/workflow-generator.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/weekly-safe-outputs-spec-review.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/weekly-issue-summary.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/weekly-editors-health-check.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/video-analyzer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/unbloat-docs.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/ubuntu-image-analyzer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/typist.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/tidy.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/test-project-url-default.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/test-dispatcher.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/test-create-pr-error-handling.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/terminal-stylist.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/technical-doc-writer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/super-linter.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/sub-issue-closer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/step-name-alignment.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/static-analysis-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/stale-repo-identifier.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-workflow-call.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-update-cross-repo-pr.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-test-tools.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-temporary-id.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-project.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-multi-pr.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-gemini.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-create-cross-repo-pr.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-copilot.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-copilot-arm.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-codex.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-claude.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/smoke-agent.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/slide-deck-maintainer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/sergo.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/semantic-function-refactor.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/security-review.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/security-compliance.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/security-alert-burndown.campaign.g.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/scout.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/schema-consistency-checker.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/safe-output-health.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/research.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/repository-quality-improver.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/repo-tree-map.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/repo-audit-analyzer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/release.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/refiner.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/q.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/python-data-charts.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/prompt-clustering-analysis.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/pr-triage-agent.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/pr-nitpick-reviewer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/portfolio-analyst.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/poem-bot.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/plan.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/pdf-summary.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/org-health-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/notion-issue-summary.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/mergefest.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/mcp-inspector.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/lockfile-stats.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/layout-spec-maintainer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/jsweep.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/issue-triage-agent.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/issue-monster.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/issue-arborist.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/instructions-janitor.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/hourly-ci-cleaner.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/grumpy-reviewer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/gpclean.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/go-pattern-detector.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/go-logger.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/go-fan.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/glossary-maintainer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/github-remote-mcp-auth-test.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/github-mcp-tools-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/github-mcp-structural-analysis.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/functional-pragmatist.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/firewall-escape.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/example-workflow-analyzer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/duplicate-code-detector.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/draft-pr-cleanup.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/docs-noob-tester.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/discussion-task-miner.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/dictation-prompt.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/developer-docs-consolidator.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/dev.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/dev-hawk.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/dependabot-go-checker.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/dependabot-burner.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/delight.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/deep-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/dead-code-remover.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-workflow-updater.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-testify-uber-super-expert.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-team-status.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-team-evolution-insights.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-syntax-error-quality.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-semgrep-scan.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-security-red-team.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-secrets-analysis.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-safe-outputs-conformance.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-safe-output-optimizer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-repo-chronicle.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-rendering-scripts-verifier.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-regulatory.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-performance-summary.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-observability-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-news.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-mcp-concurrency-analysis.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-malicious-code-scan.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-issues-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-firewall-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-file-diet.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-fact.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-doc-updater.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-doc-healer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-compiler-quality.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-code-metrics.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-cli-tools-tester.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-cli-performance.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-choice-test.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-assign-issue-to-user.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/daily-architecture-diagram.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/craft.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/copilot-session-insights.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/copilot-pr-merged-report.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/copilot-cli-deep-research.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/copilot-agent-analysis.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/contribution-check.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/commit-changes-analyzer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/code-simplifier.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/code-scanning-fixer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/cloclo.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/cli-version-checker.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/cli-consistency-checker.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/claude-code-user-docs-review.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/ci-doctor.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/ci-coach.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/changeset.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/breaking-change-checker.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/brave.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/bot-detection.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/blog-auditor.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/auto-triage-issues.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/audit-workflows.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/artifacts-summary.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/archie.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/ai-moderator.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/agent-persona-explorer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
.github/workflows/agent-performance-analyzer.lock.yml Propagates the download step id and env-setup if guard into the lockfile workflow.
Comments suppressed due to low confidence (2)

pkg/workflow/artifacts.go:66

  • The env-setup step name is hardcoded to "Setup agent output environment variable" even though buildArtifactDownloadSteps is positioned as a general helper (ArtifactDownloadConfig has EnvVarName/ArtifactName). If SetupEnvStep is ever reused for other artifacts, this step name will be misleading—consider deriving the name from config or adding a configurable env-setup step name.
    actions/setup/js/handle_agent_failure.cjs:599
  • The comment says that an absent GH_AW_AGENT_OUTPUT "indicat[es] the agent did not reach output-production", but this code is only checking whether the artifact download/env-setup ran successfully. GH_AW_AGENT_OUTPUT can also be unset if the download step failed for other reasons (e.g., transient download error). Suggest rewording the comment to describe what is actually being detected (artifact not downloaded / env var not set) to avoid over-claiming about agent execution stage.

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

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Smoke test results for run §22656383746:

Test Status
GitHub MCP
Safe Inputs GH CLI
Serena MCP
Playwright
Web Fetch
File Writing
Bash Tool
Discussion Interaction
Build gh-aw
Discussion Creation
Workflow Dispatch
PR Review

Overall: PASS (11/12 — Serena MCP tools not available)

@pelikhan @Copilot

📰 BREAKING: Report filed by Smoke Copilot ·

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Clean fix! The PR correctly gates GH_AW_AGENT_OUTPUT setup on artifact download success using id: download-agent-output + if: steps.download-agent-output.outcome == 'success'. This eliminates ENOENT noise when agents don't upload output. Tests updated accordingly. LGTM.

📰 BREAKING: Report filed by Smoke Copilot

// Add step to download artifact
steps = append(steps, fmt.Sprintf(" - name: %s\n", stepName))
// Add step ID if specified (used to condition the env-setup step on download success)
if config.StepID != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

The step ID is now correctly placed before any if conditional in the generated YAML, ensuring GitHub Actions can reference steps.download-agent-output.outcome. Clear and well-structured logic! 👍

StepName: "Download agent output artifact",
StepID: "download-agent-output",
})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding StepID: "download-agent-output" here ties the env-setup step to the download outcome via the new if: steps.download-agent-output.outcome == 'success' guard — nicely eliminates the ENOENT noise when no artifact was uploaded.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Smoke Test Results – Run §22656383726

Core Tests #1–10: ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
PR Review Tests #11–17: ✅ ✅ ✅ ⚠️ ✅ ✅ ⚠️

Overall: PARTIAL (15 passed, 2 skipped, 0 failed)

⚠️ Tests 14 and 17 skipped: no review threads to resolve, no safe test PR to close.

💥 [THE END] — Illustrated by Smoke Claude ·

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal! The conditional guard pattern (id + outcome == 'success') is clean and correct. Changes look good across all compiled workflows.

💥 [THE END] — Illustrated by Smoke Claude

@pelikhan pelikhan merged commit 25631fc into main Mar 4, 2026
44 checks passed
@pelikhan pelikhan deleted the copilot/fix-enoent-errors-on-agent-output branch March 4, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unconditional agent-output artifact download causes ENOENT noise on pre-agent failures

3 participants