Skip to content

[awf] agent: document/expose PATH-resolved binary lookup for hardcoded harness paths (Copilot copilot-cli ENOENT) #7147

Closed

Description

@lpcox

Problem
Copilot-engine workflows fail with spawn /usr/local/bin/copilot ENOENT when the gh-aw harness spawns a hardcoded absolute path that a tool-cache hit never populates. This is triggered by AWF-wrapped runs since the agent container executes the harness inside the sandbox, and the entrypoint's selective bind mounts / PATH handling are relevant to whether /usr/local/bin is writable/populated at invocation time.

Context
Original report: github/gh-aw#51373

Root Cause
Upstream: pkg/constants/constants.go hardcodes CopilotBinaryPath = "/usr/local/bin/copilot"; install_copilot_cli.sh's activate_cached_copilot_bin() returns early on GITHUB_PATH (cache-hit path) before installing the /usr/local/bin/copilot wrapper, so the constant never resolves. Not an AWF bug per se, but AWF's agent container (containers/agent/entrypoint.sh) selectively binds /usr/local read-only from host, so any host-side symlink workaround (ln -sf $(command -v copilot) /usr/local/bin/copilot) must land before the bind mount is taken, or it won't be visible inside the chroot.

Proposed Solution

  • Verify/document whether AWF's /usr/local read-only bind mount masks a host-side symlink workaround applied via pre-agent-steps.
  • If it does, document the correct workaround location (host filesystem before container start) in docs/troubleshooting.md.
  • Coordinate with gh-aw maintainers on the actual fix (installer/harness), since the root fix lives upstream.

Generated by Firewall Issue Dispatcher · auto · 32.5 AIC · ⊞ 8.9K · ◷

Activity

  1. github-actions commented on Aug 9, 2026

    @github-actions
    Contributor

    👋 Hello! I noticed this issue might be related to an existing issue:

    • [awf] copilot-harness: spawn /usr/local/bin/copilot ENOENT on tool-cache hit #7130 - "[awf] copilot-harness: spawn /usr/local/bin/copilot ENOENT on tool-cache hit" — describes the exact same root cause: install_copilot_cli.sh's activate_cached_copilot_bin() skips installing the /usr/local/bin/copilot wrapper on a tool-cache hit, and the harness always spawns the hardcoded CopilotBinaryPath (/usr/local/bin/copilot) constant, causing spawn /usr/local/bin/copilot ENOENT.

    Both issues share the same error message, upstream root cause, and reference the same original report (github/gh-aw#51373). This issue adds useful additional detail about how AWF's read-only /usr/local bind mount in containers/agent/entrypoint.sh may affect host-side workaround visibility, which could be merged into #7130 as a follow-up consideration.

    If #7130 addresses your concern, please consider closing this issue as a duplicate (or linking it as related). Otherwise, feel free to clarify how your issue differs!

    This is an automated message from the issue duplication detector.

    Generated by Issue Duplication Detector for #7147 · auto · 23.5 AIC · ⊞ 10.8K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions