Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

OpenCode engine's execution step included PATH manipulation that searched /opt/hostedtoolcache/node for the binary, but npm install -g places packages in npm's global directory which actions/setup-node already adds to PATH.

Changes:

  • Removed hostedtoolcache PATH lookup in pkg/workflow/opencode_engine.go (lines 182-184)
  • Recompiled affected workflow lock files

Before:

pathSetup := `NODE_BIN_PATH="$(find /opt/hostedtoolcache/node -mindepth 1 -maxdepth 1 -type d | head -1 | xargs basename)/x64/bin" && export PATH="/opt/hostedtoolcache/node/$NODE_BIN_PATH:$PATH"`
opencodeCommand = fmt.Sprintf(`%s && %s`, pathSetup, opencodeCommand)

After:

// Note: No PATH setup needed - actions/setup-node automatically adds npm global bin to PATH

The OpenCode CLI is now invoked directly, relying on the PATH configuration from actions/setup-node@v6.1.0.

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21041037209/job/60502640153#step:26:1

Review installation steps for opencode and file path location


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 15, 2026 21:22
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review installation steps for opencode and file path location Remove incorrect PATH setup for OpenCode npm global installation Jan 15, 2026
Copilot AI requested a review from pelikhan January 15, 2026 21:40
@pelikhan pelikhan marked this pull request as ready for review January 15, 2026 21:41
@pelikhan pelikhan merged commit d682710 into copilot/add-opencode-agentic-support Jan 15, 2026
@pelikhan pelikhan deleted the copilot/review-installation-steps-opencode branch January 15, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants