Skip to content

Compiler: fix docker-sbx runtime output for TTY, CLI staging, and agentTimeout - #45554

Merged
lpcox merged 5 commits into
mainfrom
copilot/fix-docker-sbx-runtime-support
Jul 14, 2026
Merged

Compiler: fix docker-sbx runtime output for TTY, CLI staging, and agentTimeout#45554
lpcox merged 5 commits into
mainfrom
copilot/fix-docker-sbx-runtime-support

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

docker-sbx workflows were recompiling to broken lockfiles in three places: Claude runs kept --tty, npm-installed engine CLIs were only installed into host-global paths invisible to the microVM, and generated AWF config omitted container.agentTimeout. This updates the compiler so docker-sbx recompiles preserve the CI-verified runtime behavior.

  • AWF argv: suppress --tty for docker-sbx

    • Keeps TTY for normal Claude/AWF runs.
    • Omits --tty when sandbox.agent.runtime: docker-sbx, avoiding the sbx pty timeout path.
  • Engine CLI staging: install Claude/Codex into an sbx-visible path

    • Adds a docker-sbx-specific npm install step for claude and codex under ${RUNNER_TEMP}/gh-aw/mcp-cli.
    • Creates stable symlinks in ${RUNNER_TEMP}/gh-aw/mcp-cli/bin.
    • Prepends that bin directory in the generated AWF engine command so the microVM resolves the staged CLI instead of /usr/local/bin/... on the host.
  • AWF config: emit container.agentTimeout for docker-sbx

    • Maps workflow timeout-minutes into generated AWF config for docker-sbx.
    • Falls back to the workflow default timeout when the top-level value is absent or not representable as an integer.
  • Regression coverage

    • Adds focused docker-sbx tests for:
      • --tty suppression
      • agentTimeout emission
      • Claude/Codex staged install and PATH wiring

Example of the runtime-specific TTY behavior:

if config.UsesTTY && !isDockerSbxRuntime(config.WorkflowData) {
    awfArgs = append(awfArgs, "--tty")
}

Copilot AI and others added 3 commits July 14, 2026 21:05
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix docker-sbx runtime support for TTY, CLI path, agentTimeout Compiler: fix docker-sbx runtime output for TTY, CLI staging, and agentTimeout Jul 14, 2026
Copilot finished work on behalf of lpcox July 14, 2026 21:14
Copilot AI requested a review from lpcox July 14, 2026 21:14
@github-actions

Copy link
Copy Markdown
Contributor

Hey @copilot-swe-agent — nice work tackling the three docker-sbx runtime gaps (TTY suppression, CLI path wiring, and agentTimeout emission) in one focused pass. The test additions to docker_sbx_test.go are a great sign.

One thing to address before this moves out of draft:

  • Add a PR description — the body is currently a task checklist, which is useful for tracking but doesn't tell reviewers what changed or why. A short paragraph summarising the problem being fixed and the approach taken would go a long way for review.

If you'd like a hand writing that up, assign this prompt to your coding agent:

Write a clear PR description for #45554 in github/gh-aw.
The PR fixes three docker-sbx runtime issues:
1. TTY suppression - explain what TTY behaviour was wrong and how it was fixed.
2. sbx-accessible CLI install/path wiring - explain what path issue existed and the fix.
3. AWF agentTimeout emission - explain what was missing and why it matters.
The description should cover: the problem, the approach, and any caveats for reviewers.
Add it as the PR body using: gh pr edit 45554 --repo github/gh-aw --body "..."

Generated by ✅ Contribution Check · 93.1 AIC · ⌖ 11.4 AIC · ⊞ 6.2K ·

@lpcox
lpcox marked this pull request as ready for review July 14, 2026 21:30
Copilot AI review requested due to automatic review settings July 14, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes docker-sbx lockfile generation for engine CLI visibility, TTY handling, and runtime timeouts.

Changes:

  • Stages Claude and Codex CLIs in a microVM-visible path.
  • Suppresses TTY for docker-sbx.
  • Emits container.agentTimeout with regression tests.
Show a summary per file
File Description
pkg/workflow/nodejs.go Adds docker-sbx npm staging helpers.
pkg/workflow/docker_sbx_test.go Adds docker-sbx regression coverage.
pkg/workflow/codex_engine.go Stages and resolves Codex for docker-sbx.
pkg/workflow/claude_engine.go Stages and resolves Claude for docker-sbx.
pkg/workflow/awf_helpers.go Suppresses docker-sbx TTY.
pkg/workflow/awf_config.go Emits the docker-sbx agent timeout.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Medium

Comment thread pkg/workflow/nodejs.go Outdated
Comment on lines +253 to +255
" mkdir -p \"${RUNNER_TEMP}/gh-aw/mcp-cli/bin\"",
fmt.Sprintf(` npm install %s--prefix "${RUNNER_TEMP}/gh-aw/mcp-cli" %s@"${ENGINE_VERSION}"`, ignoreScriptsFlag, packageName),
fmt.Sprintf(` ln -sf "../node_modules/.bin/%s" "${RUNNER_TEMP}/gh-aw/mcp-cli/bin/%s"`, commandName, commandName),
Comment on lines +650 to +656
timeoutMinutes, err := strconv.Atoi(rawTimeout)
if err == nil && timeoutMinutes > 0 {
return timeoutMinutes
}

if rawTimeout != "" {
awfConfigLog.Printf("Container section: non-numeric timeout-minutes %q (e.g. a GitHub Actions expression) cannot be emitted in integer-only agentTimeout; using default %d", rawTimeout, defaultTimeout)
@lpcox

lpcox commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

@copilot address the review feedback

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address the review feedback

Addressed in 5a10da8. I separated docker-sbx engine CLI staging to ${RUNNER_TEMP}/gh-aw/engine-cli/bin (independent from MCP CLI wrappers), updated AWF PATH wiring accordingly, and added table-driven timeout fallback coverage including omitted/non-numeric values and GH_AW_DEFAULT_TIMEOUT_MINUTES override.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed to deliver outputs. The oracle requires further meditation...

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Gemini MISSION COMPLETE! Gemini has spoken. ✨

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Antigravity MISSION COMPLETE! Antigravity has spoken. ✨

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Pi MISSION COMPLETE! Pi delivered. 🥧

Completed smoke test; created issue and PR comment. Label not added because tests failed.

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot - AOAI (apikey) is now investigating this pull request. Sources say the story is developing...

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot - AOAI (Entra) is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Smoke OTEL completed successfully!

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot Small completed successfully!

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Gemini Results

  1. GitHub MCP Testing: ✅
  2. Web Fetch Testing: ✅
  3. File Writing Testing: ✅
  4. Bash Tool Testing: ✅
  5. Build gh-aw: ❌

Overall Status: FAIL

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • localhost

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

Smoke Gemini — Powered by Gemini · 9.11 AIC · ⌖ 1.58 AIC · ⊞ 9.3K ·
Comment /smoke-gemini to run again

@github-actions

Copy link
Copy Markdown
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.54.0
jq 1.7
yq v4.53.3
curl 8.5.0
gh 2.96.0
node 22.23.1
python3 3.11.15
go 1.24.13
java 10.0.301
dotnet 10.0.301

Result: 12/12 tools available ✅

Overall Status: PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🔧 Tool validation by Agent Container Smoke Test · 12.2 AIC · ⌖ 7.8 AIC · ⊞ 4.5K ·
Comment /smoke-test-tools to run again

@github-actions

Copy link
Copy Markdown
Contributor

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Pull request created: #45564

Generated by Changeset Generator · 1.89 AIC · ⊞ 12.5K

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

First light on the wire
Shells hum under quiet checks
Green paths breathe at dusk

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔮 The oracle has spoken through Smoke Codex · 0.746 AIC · ⊞ 11.7K ·
Comment /smoke-codex to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Stone tests tap night
Cold bot drums on iron build
Green sparks wake cave dawn

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

📰 BREAKING: Report filed by Smoke Copilot · 139.4 AIC · ⌖ 4.22 AIC · ⊞ 19K ·
Comment /smoke-copilot to run again
Add label smoke to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke cave ran tools. Leaving short notes only.

📰 BREAKING: Report filed by Smoke Copilot · 139.4 AIC · ⌖ 4.22 AIC · ⊞ 19K
Comment /smoke-copilot to run again
Add label smoke to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results: 1✅ 2✅ 3❌ 4❌ 5✅ 6✅ 7❌ 8✅ 9❌ 10❌ 11✅ 12✅ 13✅ 14✅ 15✅
Overall: FAIL
Thanks, @app/copilot-swe-agent

📰 BREAKING: Report filed by Smoke Copilot - AOAI (apikey) · 52.5 AIC · ⌖ 3.2 AIC · ⊞ 17.9K ·
Comment /smoke-copilot-aoai-apikey to run again
Add label smoke to run again

@lpcox
lpcox merged commit df13f08 into main Jul 14, 2026
251 of 254 checks passed
@lpcox
lpcox deleted the copilot/fix-docker-sbx-runtime-support branch July 14, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler: fix docker-sbx runtime support (TTY, CLI path, agentTimeout)

3 participants