Repository navigation
Description
Summary
The agent job's Execute GitHub Copilot CLI step spawns the Copilot CLI via a hardcoded absolute path /usr/local/bin/copilot. When install_copilot_cli.sh finds a compatible cached version in the runner toolcache (within the 14-day TTL), it only activates the cached copy by prepending its directory to PATH/GITHUB_PATH — it never copies or symlinks the binary to /usr/local/bin. Since the harness ignores PATH and always spawns the hardcoded path, this results in an immediate ENOENT and the whole workflow run fails with 0 tokens used.
Where
install_copilot_cli.sh (materialized at runtime under $RUNNER_TEMP/gh-aw/actions/) — the toolcache-hit branch, roughly:
Searching toolcache for GitHub Copilot CLI ...
Found candidate: /opt/hostedtoolcache/copilot-cli/1.0.78/x64/bin/copilot (version: 1.0.78, arch: x64)
Cache age: 8 days (within TTL of 14 days)
Selected best cached version: 1.0.78 ...
Using cached GitHub Copilot CLI from /opt/hostedtoolcache/copilot-cli/1.0.78/x64/bin/copilot...
Activating cached Copilot CLI from /opt/hostedtoolcache/copilot-cli/1.0.78/x64/bin/copilot...
Prepended .../bin to PATH
Exporting .../bin to GITHUB_PATH
✓ Copilot CLI installation complete (cached)
Compare with the cache-miss (fresh download) branch, which explicitly does Installing binary to /usr/local/bin before completing — that path always succeeds.
Meanwhile the copilot-harness.cjs invocation in the agent job always resolves the binary as an absolute path:
[copilot-harness] starting: command=/usr/local/bin/copilot ...
[copilot-harness] pre-flight: command not found: /usr/local/bin/copilot (F_OK check failed — binary does not exist at this path)
[copilot-harness] attempt 1: failed to start process '/usr/local/bin/copilot': spawn /usr/local/bin/copilot ENOENT (code=ENOENT syscall=spawn /usr/local/bin/copilot)
[copilot-harness] attempt 1: no output produced — not retrying (possible causes: binary not found, permission denied, auth failure, or silent startup crash)
Repro / evidence
Observed in a private workflow using engine.id: copilot and a custom runs-on: ubuntu-slim runner label.
Multiple consecutive workflow runs failed with the identical ENOENT signature, each preceded by a toolcache hit in the Install GitHub Copilot CLI step (cached version found within the 14-day TTL). Runs interleaved between the failures that succeeded always showed a toolcache miss (cache older than the TTL) followed by Installing binary to /usr/local/bin.
This only manifests on runners with a persistent tool cache across job runs (a runner label that reuses /opt/hostedtoolcache across jobs); ephemeral GitHub-hosted runners would never have a warm cache and wouldn't hit this branch.
Expected
The toolcache-hit branch of install_copilot_cli.sh should also ensure the resolved binary is available at the same path the harness spawns (copy/symlink to /usr/local/bin/copilot), or the harness should resolve the Copilot CLI location via PATH/command -v instead of a hardcoded absolute path.
Related but distinct
- Threat-detection job silently no-ops on
arc-dindrunners: Copilot binary not staged into the chroot (spawn /usr/local/bin/copilot ENOENT) #44249 (closed, fixed by fix: propagate RunnerConfig to detection job to fix arc-dind Copilot ENOENT #44445) — a different bug where the threat-detection job droppedRunnerConfig, causing the sameENOENTsymptom for a different root cause. - arc-dind: Copilot CLI copy step emitted regardless of engine.id, breaking non-Copilot engines #51751 (open) — Copilot CLI copy step emitted unconditionally under arc-dind topology regardless of
engine.id.
This issue is specifically about the toolcache-hit branch of the Copilot CLI installer not placing the binary where the harness expects it.
Activity
ckittel commentedon Aug 12, 2026
+1 receiving what appears to be the same issue in our implementation.
myaschmitz commentedon Aug 12, 2026
This also affects standard GitHub-hosted runners, not just persistent/self-hosted ones. The report says ephemeral hosted runners "would never have a warm cache" — but
/opt/hostedtoolcache/copilot-cliis baked into the runner VM image, so a fresh ephemeral runner can start with a warm, in-TTL entry.Evidence from a single run of one workflow (stock
ubuntu-latest, gh-aw v0.85.4), two jobs on two runners:agentjob — old image, entry expired:detectionjob — newer image, entry in TTL:Same lock, same script, same run. The only variable is which VM image the job landed on. The image carrying 1.0.78 appears to have started rolling out ~6-8 days ago, which lines up with the cluster of reports (#50906, #51068, #51373, #51843, this one) all filed since Aug 6.
This gets worse, not better. The skip requires both expired and
!= max-agent. Once a runner image ships copilot-cli equal to the compat max (currently 1.0.79), the entry is used regardless of age and the TTL escape hatch disappears permanently. Every job then takes the cache-hit branch. Today that mostly surfaces indetection(which iscontinue-on-error: true, so it degrades quietly into an unscreened safe-output path plus a warning banner) — but theagentjob runs the same installer and the same hardcoded spawn, and it is notcontinue-on-error.Note also that the installer self-verifies with
command -v copilot, which succeeds via thePATHit just prepended, so it exits 0 and prints "installation complete (cached)" while/usr/local/bin/copilotdoes not exist.ckittel commentedon Aug 12, 2026
We are indeed using standard GitHub-hosted runners, and this error is the most common one we get. Awesome research @myaschmitz.
myaschmitz commentedon Aug 12, 2026
Still reproducing on
v0.85.4today, and worth flagging that #51373, #51068 and #50906 are all closed as completed while the code path is unchanged onmain.Two jobs, same workflow, same repo, ~45 min apart — the only difference is which runner image they landed on:
spawn /usr/local/bin/copilot ENOENTInstaller log from the failing run:
The verification resolves through the
PATHit just set, so it never checks the absolute path its caller uses.copilot_harness.cjsis spawned with a compile-time-baked/usr/local/bin/copilot, which the cached branch never creates.Three things that may not be captured yet:
agent, not justdetection.agentis notcontinue-on-error, so the run fails outright. 2 of 4 dispatches today.no_output:attempt 1: no output produced - not retrying.maxRetries=3never engages.1.0.79), theexpired AND != max-agentskip stops firing and the TTL escape hatch closes entirely.Workaround for anyone blocked — force a cache miss before
Install GitHub Copilot CLI:OFollan commentedon Aug 13, 2026
Confirming this on stock GitHub-hosted
ubuntu-24.04with gh-aw v0.85.4, and adding a datapoint that pins the trigger to the runner image rather than anything in the consuming repository.Two runs of the same workflow, same lock file, 16 hours apart:
20260720.247.2/usr/local/bin→ works20260810.271.1spawn /usr/local/bin/copilot ENOENTSo this is not intermittent anymore for anyone landing on the 20260810 image or later: the image now bakes in a copilot-cli young enough to satisfy the TTL, and
activate_cached_copilot_bin()returns after appending to$GITHUB_PATHwithout ever staging${INSTALL_DIR}/copilot.$GITHUB_PATHcan't help, since the agent is spawned by absolute path inside the AWF sandbox.Two things that may save others some time:
pkg/constants/constants.gostill hasconst CopilotBinaryPath = "/usr/local/bin/copilot", andactions/setup/sh/install_copilot_cli.shstill has theGITHUB_PATHearly return at the same place. The latest stable release is still v0.85.4, so there is nothing to upgrade to.setup/js/copilot_harness.cjsis byte-identical between gh-aw-actions v0.85.4 and v0.86.1, as is the cache-hit branch of the installer. We had a Dependabot bump to v0.86.1 merged and later reverted by a recompile, and neither state made any difference.Workaround we are using, as a step before the install step:
davidslater commentedon Aug 13, 2026
We just promoted v0.86.2 to release, which has the fix.
See: https://github.com/github/gh-aw/blob/v0.86.2/pkg/workflow/copilot_engine_execution.go#L125-L136