Objective
Improve the PATH setup for the agent container to expose Python, Ruby, Go, and other runtime tools installed in /opt/hostedtoolcache, not just Node.js.
Context
The /opt/hostedtoolcache directory is already mounted into the agent container, but the PATH setup currently only handles Node.js binaries. The Ubuntu runner image includes Python (3.9-3.14), Ruby (3.2-3.4), Go (1.22-1.25), and other runtimes in this directory.
Current PATH setup examples:
- Copilot engine:
find /opt/hostedtoolcache -maxdepth 4 -type d -name bin
- Claude/Codex engines:
find /opt/hostedtoolcache/node (Node-specific)
Approach
- Review how GitHub Actions runners organize tools in
/opt/hostedtoolcache:
- Structure:
/opt/hostedtoolcache/(tool)/(version)/(arch)/bin
- Common tools: node, python, go, ruby, pypy, java
- Enhance the PATH setup command to include all runtime binaries:
export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\n' ':')$PATH"
- Update the PATH setup in all three engine implementations
- Add logic to prioritize certain versions when multiple are available
- Test that Python, Ruby, Go, and Node.js are all accessible from the agent container
Files to Modify
- Modify:
pkg/workflow/copilot_engine_execution.go (line ~360: enhance PATH setup)
- Modify:
pkg/workflow/claude_engine.go (line ~247: replace Node-specific setup)
- Modify:
pkg/workflow/codex_engine.go (line ~294: replace Node-specific setup)
- Create:
pkg/workflow/runtime_path_test.go (test runtime detection)
Acceptance Criteria
AI generated by Plan Command for #11970
Objective
Improve the PATH setup for the agent container to expose Python, Ruby, Go, and other runtime tools installed in
/opt/hostedtoolcache, not just Node.js.Context
The
/opt/hostedtoolcachedirectory is already mounted into the agent container, but the PATH setup currently only handles Node.js binaries. The Ubuntu runner image includes Python (3.9-3.14), Ruby (3.2-3.4), Go (1.22-1.25), and other runtimes in this directory.Current PATH setup examples:
find /opt/hostedtoolcache -maxdepth 4 -type d -name binfind /opt/hostedtoolcache/node(Node-specific)Approach
/opt/hostedtoolcache:/opt/hostedtoolcache/(tool)/(version)/(arch)/binFiles to Modify
pkg/workflow/copilot_engine_execution.go(line ~360: enhance PATH setup)pkg/workflow/claude_engine.go(line ~247: replace Node-specific setup)pkg/workflow/codex_engine.go(line ~294: replace Node-specific setup)pkg/workflow/runtime_path_test.go(test runtime detection)Acceptance Criteria
node,python3,ruby,gocommands are availableRelated to epic: build/test environment for agentic workflow #11970