Skip to content

Add --allow-all-paths flag for edit tool in copilot engine#1871

Merged
pelikhan merged 4 commits intomainfrom
copilot/update-copilot-engine-flag
Oct 17, 2025
Merged

Add --allow-all-paths flag for edit tool in copilot engine#1871
pelikhan merged 4 commits intomainfrom
copilot/update-copilot-engine-flag

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 17, 2025

Overview

This PR updates the copilot engine to use the --allow-all-paths flag instead of --add-dir / when the edit tool is enabled, addressing path permission issues with the GitHub Copilot CLI.

Changes

Code Updates

pkg/workflow/copilot_engine.go

pkg/workflow/copilot_engine_test.go

  • Renamed test from TestCopilotEngineEditToolAddsRootDir to TestCopilotEngineEditToolAddsAllowAllPaths
  • Updated test assertions to validate the new flag behavior

Workflow Recompilation

All existing workflows using the copilot engine with edit tool have been recompiled to use the new flag:

  • mcp-inspector.lock.yml
  • poem-bot.lock.yml
  • q.lock.yml
  • repo-tree-map.lock.yml
  • scout.lock.yml
  • tidy.lock.yml

Example

Before:

copilot --add-dir /tmp/gh-aw/ ... --allow-tool write --add-dir / --prompt "$COPILOT_CLI_INSTRUCTION"

After:

copilot --add-dir /tmp/gh-aw/ ... --allow-tool write --allow-all-paths --prompt "$COPILOT_CLI_INSTRUCTION"

Testing

  • ✅ All unit tests pass
  • ✅ Manual verification with test workflows confirms correct behavior
  • ✅ Build successful
  • ✅ Linting passed

References

Original prompt

Update the copilot engine to include the "--allow-all-paths" flag when the "edit" tool is enabled.

Add comment linking to
github/copilot-cli#67 (comment)


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits October 17, 2025 16:23
- Replace --add-dir / with --allow-all-paths flag when edit tool is enabled
- Update comment to link to specific GitHub issue comment
- Update tests to check for --allow-all-paths instead of --add-dir /
- Rename test function to reflect new flag name

Fixes: github/copilot-cli#67 (comment)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
All workflows using copilot engine with edit tool have been recompiled to use the new --allow-all-paths flag instead of --add-dir /

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update copilot engine to include --allow-all-paths flag Add --allow-all-paths flag for edit tool in copilot engine Oct 17, 2025
@pelikhan pelikhan marked this pull request as ready for review October 17, 2025 16:27
Copilot AI requested a review from pelikhan October 17, 2025 16:27
@github-actions
Copy link
Copy Markdown
Contributor

Agentic Changeset Generator triggered by this pull request.

@pelikhan pelikhan merged commit c919a6c into main Oct 17, 2025
3 checks passed
@pelikhan pelikhan deleted the copilot/update-copilot-engine-flag branch October 17, 2025 16:32
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