fix(copilot): add --log-dir flag for sandbox mode to enable log parsing#4524
Closed
Copilot wants to merge 2 commits intomossaka/srtfrom
Closed
fix(copilot): add --log-dir flag for sandbox mode to enable log parsing#4524Copilot wants to merge 2 commits intomossaka/srtfrom
Copilot wants to merge 2 commits intomossaka/srtfrom
Conversation
When SRT (Sandbox Runtime) or AWF (Agentic Workflow Firewall) is enabled, the Copilot CLI was not writing logs to the expected directory because the --log-dir flag was omitted. This caused the log parsing step to fail with "Log path not found: /tmp/gh-aw/.copilot/logs/". This commit fixes the issue by: - Adding --log-dir flag to copilot args when sandbox is enabled - Updating test files to fix compilation errors with enableFirewallByDefaultForCopilot - Recompiling all affected Copilot workflows Fixes the workflow failure in https://github.com/githubnext/gh-aw/actions/runs/19582436139/job/56083451895 Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new sandbox for copilot with sandbox-runtime support
fix(copilot): add --log-dir flag for sandbox mode to enable log parsing
Nov 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot CLI was not writing logs to
/tmp/gh-aw/.copilot/logs/when SRT or AWF sandbox was enabled, causing log parsing to fail with "Log path not found".Changes
Core fix:
--log-dirflag to Copilot CLI arguments when sandbox mode is enabled (previously only present in non-sandbox mode)Test updates:
enableFirewallByDefaultForCopilotcall sites infirewall_default_enablement_test.goto include required*SandboxConfigparameterCode diff:
if sandboxEnabled { - copilotArgs = []string{"--add-dir", "/tmp/gh-aw/", "--log-level", "all"} + copilotArgs = []string{"--add-dir", "/tmp/gh-aw/", "--log-level", "all", "--log-dir", logsFolder} }Fixes workflow failure in https://github.com/githubnext/gh-aw/actions/runs/19582436139/job/56083451895
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.