Summary
Several env: blocks in engine files use hardcoded /tmp/gh-aw paths for MCP configuration instead of ${{ runner.temp }}/gh-aw, which is inconsistent with the path migration done in #21443.
Affected code
pkg/workflow/claude_engine.go:318 — GH_AW_MCP_CONFIG: /tmp/gh-aw/mcp-config/mcp-servers.json
pkg/workflow/codex_engine.go:290 — GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
pkg/workflow/codex_engine.go:293 — GH_AW_MCP_CONFIG: /tmp/gh-aw/mcp-config/config.toml
pkg/workflow/codex_engine.go:294 — CODEX_HOME: /tmp/gh-aw/mcp-config
These are YAML env: fields, which are evaluated by the GitHub Actions runner (not the shell). They should use ${{ runner.temp }}/gh-aw/... expressions if they need to be portable across runner types.
Context
PR #21443 migrated the "setup tree" from /opt/gh-aw to ${{ runner.temp }}/gh-aw for self-hosted runner compatibility. However, the "runtime tree" (/tmp/gh-aw) was intentionally left at a hardcoded path. The MCP config directory (/tmp/gh-aw/mcp-config/) lives in this runtime tree.
On GitHub-hosted runners $RUNNER_TEMP = /home/runner/work/_temp, so ${RUNNER_TEMP}/gh-aw and /tmp/gh-aw are two physically different directories. The hardcoded /tmp/gh-aw works today because the runtime tree is always written to /tmp/gh-aw regardless of runner type.
Questions to resolve
- Should the runtime tree (
/tmp/gh-aw) also be migrated to ${{ runner.temp }}/gh-aw for full consistency? This would unify both trees but requires updating AWF mounts (currently /tmp/gh-aw:/tmp/gh-aw:rw), the MCP gateway payload dir, log paths, and the entrypoint chown logic.
- Or should this remain as-is with a code comment documenting the intentional two-tree design?
Related
Summary
Several
env:blocks in engine files use hardcoded/tmp/gh-awpaths for MCP configuration instead of${{ runner.temp }}/gh-aw, which is inconsistent with the path migration done in #21443.Affected code
pkg/workflow/claude_engine.go:318—GH_AW_MCP_CONFIG: /tmp/gh-aw/mcp-config/mcp-servers.jsonpkg/workflow/codex_engine.go:290—GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txtpkg/workflow/codex_engine.go:293—GH_AW_MCP_CONFIG: /tmp/gh-aw/mcp-config/config.tomlpkg/workflow/codex_engine.go:294—CODEX_HOME: /tmp/gh-aw/mcp-configThese are YAML
env:fields, which are evaluated by the GitHub Actions runner (not the shell). They should use${{ runner.temp }}/gh-aw/...expressions if they need to be portable across runner types.Context
PR #21443 migrated the "setup tree" from
/opt/gh-awto${{ runner.temp }}/gh-awfor self-hosted runner compatibility. However, the "runtime tree" (/tmp/gh-aw) was intentionally left at a hardcoded path. The MCP config directory (/tmp/gh-aw/mcp-config/) lives in this runtime tree.On GitHub-hosted runners
$RUNNER_TEMP=/home/runner/work/_temp, so${RUNNER_TEMP}/gh-awand/tmp/gh-aware two physically different directories. The hardcoded/tmp/gh-awworks today because the runtime tree is always written to/tmp/gh-awregardless of runner type.Questions to resolve
/tmp/gh-aw) also be migrated to${{ runner.temp }}/gh-awfor full consistency? This would unify both trees but requires updating AWF mounts (currently/tmp/gh-aw:/tmp/gh-aw:rw), the MCP gateway payload dir, log paths, and the entrypoint chown logic.Related
/opt/gh-aw→${{ runner.temp }}/gh-awmigration/tmp/gh-aw/mcp-config/permissions on self-hosted runners