Problem
Tools installed by GitHub Actions setup-* actions (e.g., astral-sh/setup-uv, actions/setup-node, ruby/setup-ruby) add their bin directories to $GITHUB_PATH. Inside the AWF agent chroot, these tools resolve as command not found unless invoked via absolute path, even though they work fine in pre-agent workflow steps.
Example: uv run ... → bash: line 1: uv: command not found inside AWF; absolute path invocation in the same run works.
Context
Original report: github/gh-aw#21144
AWF has a mechanism to handle this: src/docker-manager.ts:163–210 (readGitHubPathEntries() and mergeGitHubPathEntries()) reads the $GITHUB_PATH file and merges its entries into AWF_HOST_PATH before composing the agent environment. The containers/agent/entrypoint.sh chroot PATH logic then uses AWF_HOST_PATH to build the final PATH inside the chroot.
The issue may be:
- The fix was merged after v0.60.0 (the version in the report) and is not yet verified against the
setup-uv case.
- The
$GITHUB_PATH file may not be set in certain runner configurations (e.g., self-hosted runners that do not set GITHUB_PATH).
- The entrypoint's chroot PATH construction (
containers/agent/entrypoint.sh) may not correctly translate host paths under /home/runner/... to their chroot equivalents under /host/home/runner/....
Root Cause
src/docker-manager.ts:557–565:
const githubPathEntries = readGitHubPathEntries();
environment.AWF_HOST_PATH = mergeGitHubPathEntries(process.env.PATH, githubPathEntries);
This only runs when GITHUB_PATH env var is set AND the file exists. On some self-hosted runners, GITHUB_PATH may not be set as a process env var, causing readGitHubPathEntries() to return [] and the setup-uv path to be absent from AWF_HOST_PATH.
The entrypoint then constructs the chroot PATH from AWF_HOST_PATH, prefixing each entry with /host. If setup-uv installs uv to /home/runner/.local/bin, that becomes /host/home/runner/.local/bin in the chroot — correct only if the host home is mounted there.
Proposed Solution
-
Add debug logging in readGitHubPathEntries() (src/docker-manager.ts:163) when GITHUB_PATH is unset or the file is missing, so the issue is visible with --log-level debug.
-
Verify end-to-end with setup-uv: write an integration test (or smoke test in .github/workflows/) that:
- Runs
astral-sh/setup-uv before the AWF step
- Confirms
uv --version succeeds inside the AWF agent
-
Fallback: if GITHUB_PATH env var is not set but $PATH already contains the tool's directory (because the runner pre-sets it), ensure AWF_HOST_PATH includes those entries.
-
Document in README.md or docs/environment.md that $GITHUB_PATH-based tool installations are automatically available inside the AWF chroot, and note the minimum AWF version where this was introduced.
Generated by AWF Issue Auditor · ◷
Problem
Tools installed by GitHub Actions
setup-*actions (e.g.,astral-sh/setup-uv,actions/setup-node,ruby/setup-ruby) add their bin directories to$GITHUB_PATH. Inside the AWF agent chroot, these tools resolve ascommand not foundunless invoked via absolute path, even though they work fine in pre-agent workflow steps.Example:
uv run ...→bash: line 1: uv: command not foundinside AWF; absolute path invocation in the same run works.Context
Original report: github/gh-aw#21144
AWF has a mechanism to handle this:
src/docker-manager.ts:163–210(readGitHubPathEntries()andmergeGitHubPathEntries()) reads the$GITHUB_PATHfile and merges its entries intoAWF_HOST_PATHbefore composing the agent environment. Thecontainers/agent/entrypoint.shchroot PATH logic then usesAWF_HOST_PATHto build the finalPATHinside the chroot.The issue may be:
setup-uvcase.$GITHUB_PATHfile may not be set in certain runner configurations (e.g., self-hosted runners that do not setGITHUB_PATH).containers/agent/entrypoint.sh) may not correctly translate host paths under/home/runner/...to their chroot equivalents under/host/home/runner/....Root Cause
src/docker-manager.ts:557–565:This only runs when
GITHUB_PATHenv var is set AND the file exists. On some self-hosted runners,GITHUB_PATHmay not be set as a process env var, causingreadGitHubPathEntries()to return[]and thesetup-uvpath to be absent fromAWF_HOST_PATH.The entrypoint then constructs the chroot PATH from
AWF_HOST_PATH, prefixing each entry with/host. Ifsetup-uvinstallsuvto/home/runner/.local/bin, that becomes/host/home/runner/.local/binin the chroot — correct only if the host home is mounted there.Proposed Solution
Add debug logging in
readGitHubPathEntries()(src/docker-manager.ts:163) whenGITHUB_PATHis unset or the file is missing, so the issue is visible with--log-level debug.Verify end-to-end with
setup-uv: write an integration test (or smoke test in.github/workflows/) that:astral-sh/setup-uvbefore the AWF stepuv --versionsucceeds inside the AWF agentFallback: if
GITHUB_PATHenv var is not set but$PATHalready contains the tool's directory (because the runner pre-sets it), ensureAWF_HOST_PATHincludes those entries.Document in
README.mdordocs/environment.mdthat$GITHUB_PATH-based tool installations are automatically available inside the AWF chroot, and note the minimum AWF version where this was introduced.