Skip to content

[awf] copilot-engine: cached-CLI activation skips /usr/local/bin wrapper causing ENOENT #7241

Description

@lpcox

Problem
When the Copilot CLI toolcache has a valid cached entry, install_copilot_cli.sh only exports the cache dir to PATH/GITHUB_PATH and skips installing the /usr/local/bin/copilot wrapper, so the AWF harness (which hardcodes that path) cannot spawn the agent and the run fails immediately (failureClass=no_output), commonly misread as an engine/network problem.

Context
Original report: github/gh-aw#51843 (see also duplicate github/gh-aw#51373)

Root Cause
activate_cached_copilot_bin() in actions/setup/sh/install_copilot_cli.sh (lines ~481-507) returns early once GITHUB_PATH is set -- true for every GitHub Actions run -- before reaching the install -m 0755 "$wrapper_path" "${INSTALL_DIR}/copilot" step. pkg/constants/constants.go hardcodes CopilotBinaryPath = "/usr/local/bin/copilot", so only a cold/fresh install (which always installs to INSTALL_DIR) satisfies that path; a warm cache never does.

Proposed Solution
Have the AWF agent entrypoint verify /usr/local/bin/copilot exists at container start; if missing, fall back to resolving copilot via PATH/GITHUB_PATH entries and create the expected symlink/wrapper before the harness pre-flight check runs. This decouples AWF's hardcoded spawn path from upstream toolcache activation behavior.

Generated by Firewall Issue Dispatcher · auto · 30.5 AIC · ⊞ 9K · ◷

Activity

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