Skip to content

Start-Copilot: map --assisted-approval, --allow-all-tools, --usage-output-file, native --enable-mcp-server - #121

Merged
shmuelie merged 2 commits into
mainfrom
shmuelie/copilot-cli-flags
Aug 25, 2026
Merged

Start-Copilot: map --assisted-approval, --allow-all-tools, --usage-output-file, native --enable-mcp-server#121
shmuelie merged 2 commits into
mainfrom
shmuelie/copilot-cli-flags

Conversation

@shmuelie

Copy link
Copy Markdown
Owner

Adds first-class Start-Copilot / Get-CopilotLaunchPlan parameters for Copilot CLI launch flags that previously had no mapping (only reachable via -RemainingArgs), and extends the MCP enable behavior.

Parameter CLI flag Notes
-AssistedApproval --assisted-approval Review permission requests with the assisted-approval safety judge (needs experimental mode, on by default)
-AllowAllTools --allow-all-tools Auto-approve tools while keeping file-path/URL verification; implies not passing --allow-all
-UsageOutputFile --usage-output-file <path> Write final usage statistics as JSON; most useful with -Prompt
-EnableMcpServer (existing) --enable-mcp-server Now also passes the CLI's native flag, so a server disabled in the Copilot settings is enabled for the run — in addition to overriding the path-based autoConnect policy

The parameters live on Get-CopilotLaunchPlan (the shared core that builds the argument vector); Start-Copilot surfaces them and auto-forwards every bound parameter the core accepts. -AllowAllTools suppresses the default --allow-all so the two are not emitted together.

Tests (6 new cases asserting the emitted args, the allow-all suppression, native enable-mcp emission, and Start-Copilot -PassThru forwarding), README, and CHANGELOG updated. Full Copilot suite: 65 passed, 0 failed; Test-Modules.ps1 green.

Closes #117
Closes #118
Closes #119
Closes #120

shmuelie and others added 2 commits August 25, 2026 10:15
Add first-class parameters for Copilot CLI flags that previously had no mapping
(reachable only via -RemainingArgs):

- -AssistedApproval  -> --assisted-approval (assisted-approval safety judge)
- -AllowAllTools     -> --allow-all-tools (auto-approve tools while keeping
                        path/URL verification; implies not passing --allow-all)
- -UsageOutputFile   -> --usage-output-file <path> (write usage JSON)

Also extend -EnableMcpServer to pass the CLI's native --enable-mcp-server, so a
server disabled in the Copilot settings is enabled for the run, in addition to
the existing path-based autoConnect override.

Parameters are added to Get-CopilotLaunchPlan (the shared core) and surfaced on
Start-Copilot, which auto-forwards them. Tests, README, and CHANGELOG updated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b98f01a0-a039-492f-8576-b1917e54742d
- Warn when -AssistedApproval is combined with -NoExperimental (the CLI needs
  experimental mode for the assisted-approval judge to engage).
- Document that -AllowAllTools keeps file-path/URL verification, so fully
  non-interactive (-Prompt) use may also need -AllowAllPaths / -AllowAllUrls.
- Document that -EnableMcpServer's native --enable-mcp-server is a no-op for an
  already-enabled server; refresh the README feature list.
- Add interaction tests: NoExperimental+AssistedApproval warning,
  NoAllowAll+AllowAllTools suppression, native enable with an mcp-config present
  (server enabled, not disabled), usage-output-file value adjacency, and
  -EnableMcpServer passthrough via Start-Copilot -PassThru.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b98f01a0-a039-492f-8576-b1917e54742d
@shmuelie

Copy link
Copy Markdown
Owner Author

Peer review (Correctness, Skeptic, Craft panel). No blocking bugs — the suppression logic, no-double-emit, parameter parity, and Start-Copilot forwarding were all confirmed correct. Applied the panel's important/minor findings in the latest commit:

  • -AssistedApproval + -NoExperimental (Skeptic): the CLI needs experimental mode for the judge to engage — now emits a Write-Warning, with a test.
  • -AllowAllTools headless semantics (Skeptic): documented that it keeps file-path/URL verification, so fully non-interactive -Prompt use may also need -AllowAllPaths/-AllowAllUrls.
  • -EnableMcpServer behavior change (Skeptic/Correctness): documented that the native --enable-mcp-server is a no-op for an already-enabled server, and added a test with an mcp-config.json present asserting the named server is enabled (native flag) and not disabled.
  • Test coverage (all three): added -NoAllowAll -AllowAllTools suppression, --usage-output-file value-adjacency in the passthrough test, and an -EnableMcpServer passthrough test.
  • README (Skeptic): refreshed the "sensible defaults" bullet to note the -AllowAllTools middle ground and list the new flags.

Copilot suite now 69 passed, 0 failed; Test-Modules.ps1 green.

@shmuelie
shmuelie merged commit a169141 into main Aug 25, 2026
1 check passed
@shmuelie
shmuelie deleted the shmuelie/copilot-cli-flags branch August 25, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment