Fix: gh-aw binary unavailable in workspace for agentic-workflows custom steps#18940
Closed
Fix: gh-aw binary unavailable in workspace for agentic-workflows custom steps#18940
Conversation
…m steps When a workflow configures the `agentic-workflows` tool and has custom steps that use `./gh-aw` (e.g. `./gh-aw logs`), the binary was not available in the workspace in production (non-dev) mode. This is because: - Dev mode: `generateDevModeCLIBuildSteps` builds binary from source and places it at `./gh-aw` BEFORE custom steps run. - Production mode: `Install gh-aw extension` (in MCP setup) runs AFTER custom steps, copying the binary only to `/opt/gh-aw/gh-aw`. The fix adds `generateGhAwWorkspaceBinaryStep` which installs the gh-aw extension and copies the binary to `./gh-aw` in the workspace. This step is generated BEFORE custom steps when: - NOT in dev mode - `agentic-workflows` tool is configured - Custom steps exist - The workflow doesn't import `shared/mcp/gh-aw.md` (which handles it) Also adds `workflowHasGhAwImport` helper and tests for the new behavior. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix missing gh-aw binary in runner working directory
Fix: gh-aw binary unavailable in workspace for agentic-workflows custom steps
Feb 28, 2026
Contributor
|
@copilot do not install gh-aw , you should be using the container that is published along with the release. |
…orkspace Instead of installing the gh-aw extension (via gh extension install), use the published release container (ghcr.io/github/gh-aw:<version>) to extract the binary using docker create/cp. This places the native statically-compiled binary at ./gh-aw in the workspace, making it available for custom steps (e.g. ./gh-aw logs) before the MCP setup phase runs. For a release binary v0.50.7, the container image is ghcr.io/github/gh-aw:0.50.7 (semver without 'v' prefix, matching the container registry tags). Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Updated in e9cf548. The - name: Install gh-aw CLI
run: |
docker pull ghcr.io/github/gh-aw:0.50.7
CONTAINER=$(docker create ghcr.io/github/gh-aw:0.50.7)
docker cp "${CONTAINER}:/usr/local/bin/gh-aw" ./gh-aw
docker rm "${CONTAINER}" > /dev/null
chmod +x ./gh-awWarning 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
In production mode, workflows using
agentic-workflowswith custom steps that call./gh-awwould fail — the binary only existed in dev mode (built from source before custom steps) or after MCP setup (too late, after custom steps already ran).Changes
generateGhAwWorkspaceBinaryStep— new function that extracts thegh-awbinary from the published release container (ghcr.io/github/gh-aw:<version>) usingdocker create/cp, placing it at./gh-awin the workspace before custom steps runworkflowHasGhAwImport— helper to skip early install whenshared/mcp/gh-aw.mdimport already handles itagentic-workflowstool configured + custom steps exist + no gh-aw importStep ordering (production mode, before → after)
The generated step looks like:
Dev mode is unchanged — the binary is still built from source via
generateDevModeCLIBuildSteps.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.