Skip to content

env: blocks use hardcoded /tmp/gh-aw for MCP config paths instead of runner.temp #25145

@Mossaka

Description

@Mossaka

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:318GH_AW_MCP_CONFIG: /tmp/gh-aw/mcp-config/mcp-servers.json
  • pkg/workflow/codex_engine.go:290GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
  • pkg/workflow/codex_engine.go:293GH_AW_MCP_CONFIG: /tmp/gh-aw/mcp-config/config.toml
  • pkg/workflow/codex_engine.go:294CODEX_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

  1. 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.
  2. Or should this remain as-is with a code comment documenting the intentional two-tree design?

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions