Skip to content

fix(copilot): add --log-dir flag for sandbox mode to enable log parsing#4524

Closed
Copilot wants to merge 2 commits intomossaka/srtfrom
copilot/sub-pr-4295
Closed

fix(copilot): add --log-dir flag for sandbox mode to enable log parsing#4524
Copilot wants to merge 2 commits intomossaka/srtfrom
copilot/sub-pr-4295

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 21, 2025

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:

  • Added --log-dir flag to Copilot CLI arguments when sandbox mode is enabled (previously only present in non-sandbox mode)

Test updates:

  • Fixed enableFirewallByDefaultForCopilot call sites in firewall_default_enablement_test.go to include required *SandboxConfig parameter

Code 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.

Copilot AI self-assigned this Nov 21, 2025
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
Copilot AI requested a review from Mossaka November 21, 2025 23:17
@Mossaka Mossaka closed this Nov 22, 2025
@pelikhan pelikhan deleted the copilot/sub-pr-4295 branch November 22, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants