You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite significant ARC/DinD improvements in AWF (PRs #2839, #2843, #3218, #3554, #3852, #3914, #4026), real-world users on ARC/DinD runners still require a composite action with ~100 lines of shell workarounds to get agentic workflows running. See gh-aw#34896 comment for the full workaround code.
The core infrastructure (path prefix, socket detection, /etc synthesis) is fixed. This issue tracks the remaining gaps that prevent a truly zero-workaround experience.
Gap 1: Copilot HOME/identity vars not forwarded in chroot mode
Problem: AWF chroot mode passes HOME=/home/runner, USER=root, LOGNAME=root to the agent exec regardless of engine.env settings. The Copilot CLI can't write to ~/.copilot in the chrooted DinD filesystem and exits silently with status 1.
Current workaround: Users create a shell shim (copilot.real + wrapper) that forces HOME=/tmp/gh-aw/home USER=runner LOGNAME=runner before exec'ing the real binary.
AWF's entrypoint.sh reads these from config and sets HOME, USER, LOGNAMEafter the chroot pivot, overriding the defaults.
Document in awf-config-schema.json and docs/chroot-mode.md.
Gap 2: /tmp/gh-aw directory tree pre-staging inside DinD daemon
Problem: On ARC/DinD, the Docker daemon's /tmp is a separate filesystem from the runner's /tmp. AWF writes files to the runner's /tmp/gh-aw/, but the daemon (which creates containers) can't see them. Users must pre-create the directory tree with correct permissions inside the daemon's filesystem before AWF runs.
Current workaround: Users run docker run --rm ... -v /tmp:/host-tmp:rw ... mkdir -p /host-tmp/gh-aw/{.cache,.config,.local/state,home,mcp-logs,...} && chmod -R 0777 as a pre-agent step.
When preStageDirs: true and a DinD environment is detected, AWF runs a lightweight init container to create the required directory tree with open permissions before starting the compose stack.
Gap 3: Engine binary staging into DinD daemon's /usr/local/bin
Problem: The Copilot CLI is installed on the runner at runtime by gh-aw. But in DinD mode, the runner's filesystem is not visible to containers created by the daemon. The binary must be copied into the daemon's filesystem so AWF's /usr:/host/usr:ro mount exposes it inside the chroot.
Current workaround: Users docker run ... -v /usr/local/bin:/daemon-usr-local-bin:rw ... cp copilot /daemon-usr-local-bin/ after installation.
AWF detects the DinD split filesystem, locates the engine binary on the runner, and stages it into the daemon's filesystem via a short-lived container before starting the agent.
The binary path comes from config (non-sensitive); no secrets involved.
Gap 4: MCP DOCKER_HOST env for DinD socket
Problem: MCP servers (github-mcp-server, mcpg) need to know the Docker socket location when running inside DinD. The user currently has to manually set sandbox.mcp.env.DOCKER_HOST.
Current workaround:sandbox.mcp.env.DOCKER_HOST: tcp://localhost:2375 in workflow frontmatter.
Proposed fix:
When AWF detects DinD mode (already supported), automatically propagate the detected Docker host to MCP server containers as DOCKER_HOST.
No config change needed — this is implicit behavior when --enable-dind or auto-detection is active.
Design Principles
All proposed config fields follow AWF's existing conventions:
Parameter
Location
Rationale
chroot.identity.home
stdin config
Non-sensitive path configuration
chroot.identity.user
stdin config
Non-sensitive identity hint
chroot.identity.uid/gid
stdin config
Non-sensitive numeric IDs
dind.preStageDirs
stdin config
Boolean flag, no secrets
dind.workDir
stdin config
Non-sensitive path
dind.stagingImage
stdin config
Non-sensitive image reference
dind.stageEngineBinary.path
stdin config
Non-sensitive filesystem path
API keys, tokens
env vars only
Never in config — passed via -e flags
Documentation requirements
All new fields MUST be added to src/awf-config-schema.json with descriptions
All new fields MUST be reflected in src/types/ TypeScript interfaces
docs/chroot-mode.md MUST document the ARC/DinD identity override behavior
A new docs/arc-dind.md guide should consolidate all ARC/DinD configuration in one place
The AWF spec (awf-config-spec.yaml if applicable) MUST include the new fields
Success Criteria
A user on ARC/DinD runners can run an agentic workflow with only standard workflow frontmatter fields (no composite action, no pre-agent-steps, no resources: block). The AWF binary handles all filesystem staging internally based on the stdin config provided by the gh-aw compiler.
Context
Despite significant ARC/DinD improvements in AWF (PRs #2839, #2843, #3218, #3554, #3852, #3914, #4026), real-world users on ARC/DinD runners still require a composite action with ~100 lines of shell workarounds to get agentic workflows running. See gh-aw#34896 comment for the full workaround code.
The core infrastructure (path prefix, socket detection, /etc synthesis) is fixed. This issue tracks the remaining gaps that prevent a truly zero-workaround experience.
Gap 1: Copilot HOME/identity vars not forwarded in chroot mode
Problem: AWF chroot mode passes
HOME=/home/runner,USER=root,LOGNAME=rootto the agent exec regardless ofengine.envsettings. The Copilot CLI can't write to~/.copilotin the chrooted DinD filesystem and exits silently with status 1.Current workaround: Users create a shell shim (
copilot.real+ wrapper) that forcesHOME=/tmp/gh-aw/home USER=runner LOGNAME=runnerbefore exec'ing the real binary.Proposed fix:
chroot.identityto stdin config:{ "chroot": { "identity": { "home": "/tmp/gh-aw/home", "user": "runner", "uid": 1001, "gid": 1001 } } }entrypoint.shreads these from config and setsHOME,USER,LOGNAMEafter the chroot pivot, overriding the defaults.awf-config-schema.jsonanddocs/chroot-mode.md.Gap 2: /tmp/gh-aw directory tree pre-staging inside DinD daemon
Problem: On ARC/DinD, the Docker daemon's
/tmpis a separate filesystem from the runner's/tmp. AWF writes files to the runner's/tmp/gh-aw/, but the daemon (which creates containers) can't see them. Users must pre-create the directory tree with correct permissions inside the daemon's filesystem before AWF runs.Current workaround: Users run
docker run --rm ... -v /tmp:/host-tmp:rw ... mkdir -p /host-tmp/gh-aw/{.cache,.config,.local/state,home,mcp-logs,...} && chmod -R 0777as a pre-agent step.Proposed fix:
dind.preStageDirsto stdin config:{ "dind": { "preStageDirs": true, "workDir": "/tmp/gh-aw", "stagingImage": "ghcr.io/github/gh-aw-firewall/agent:latest" } }preStageDirs: trueand a DinD environment is detected, AWF runs a lightweight init container to create the required directory tree with open permissions before starting the compose stack.Gap 3: Engine binary staging into DinD daemon's /usr/local/bin
Problem: The Copilot CLI is installed on the runner at runtime by gh-aw. But in DinD mode, the runner's filesystem is not visible to containers created by the daemon. The binary must be copied into the daemon's filesystem so AWF's
/usr:/host/usr:romount exposes it inside the chroot.Current workaround: Users
docker run ... -v /usr/local/bin:/daemon-usr-local-bin:rw ... cp copilot /daemon-usr-local-bin/after installation.Proposed fix:
dind.stageEngineBinaryto stdin config:{ "dind": { "stageEngineBinary": { "path": "/usr/local/bin/copilot", "targetPath": "/usr/local/bin/copilot" } } }Gap 4: MCP DOCKER_HOST env for DinD socket
Problem: MCP servers (github-mcp-server, mcpg) need to know the Docker socket location when running inside DinD. The user currently has to manually set
sandbox.mcp.env.DOCKER_HOST.Current workaround:
sandbox.mcp.env.DOCKER_HOST: tcp://localhost:2375in workflow frontmatter.Proposed fix:
DOCKER_HOST.--enable-dindor auto-detection is active.Design Principles
All proposed config fields follow AWF's existing conventions:
chroot.identity.homechroot.identity.userchroot.identity.uid/giddind.preStageDirsdind.workDirdind.stagingImagedind.stageEngineBinary.path-eflagsDocumentation requirements
src/awf-config-schema.jsonwith descriptionssrc/types/TypeScript interfacesdocs/chroot-mode.mdMUST document the ARC/DinD identity override behaviordocs/arc-dind.mdguide should consolidate all ARC/DinD configuration in one placeawf-config-spec.yamlif applicable) MUST include the new fieldsSuccess Criteria
A user on ARC/DinD runners can run an agentic workflow with only standard workflow frontmatter fields (no composite action, no
pre-agent-steps, noresources:block). The AWF binary handles all filesystem staging internally based on the stdin config provided by the gh-aw compiler.References
src/awf-config-schema.jsondocs/chroot-mode.md