Original URL: https://getagenttools.com/blog/copilot-cli-allow-all-tools/

# Copilot CLI allow all tools: --allow-all-tools, --yolo and what deny rules still block

28 Oct 2026Marek.

- copilot
- coding-agents
- agent-security

GitHub Copilot CLI has no `--dangerously-skip-permissions`. To allow all tools, start it with `--allow-all-tools`. For tools, paths and URLs at once, use `--allow-all`. Its alias is `--yolo`. Deny rules from `--deny-tool` still win over all of them. Inside a session, `/permissions allow-all` does the same as `--allow-all`.

 

```bash
# Tools only: no approval prompt for any tool
copilot --allow-all-tools

# Tools, paths and URLs
copilot --allow-all
copilot --yolo

# Everything allowed, except pushes
copilot --allow-all --deny-tool='shell(git push)'
```

  

- **What it is.** Four flags. `--allow-all-tools`, `--allow-all-paths` and `--allow-all-urls` each open one gate. `--allow-all` opens all three.
- **What it keeps.** Deny rules. The docs say they win "even when `--allow-all` is set".
- **What it does not touch.** Saved approvals in `~/.copilot/permissions-config.json`. They stay on disk.
- **Who can switch it off.** An admin, with `permissions.disableBypassPermissionsMode`.
- **How I know.** I do not run Copilot CLI. This post reads the GitHub docs and the CLI changelog on 25 October 2026.

 

The Claude Code flag, and what still stops Claude under it, is in my [--dangerously-skip-permissions](https://getagenttools.com/blog/dangerously-skip-permissions/) post. This one is the Copilot side.

 

## What is the Copilot CLI version of dangerously skip permissions?

 

Two flags. The [command reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference) describes `--allow-all-tools` as "Allow all tools to run automatically without confirmation." That is the closest match by name. `--allow-all` is the closer match by effect. It is "equivalent to `--allow-all-tools --allow-all-paths --allow-all-urls`". `--yolo` is listed as "equivalent to `--allow-all`".

 

The command reference does not list `--dangerously-skip-permissions`. I did not run it, so I cannot say what the CLI does with it.

 

Without these flags, the [allowing tools page](https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools) lets reads, searches and read-only shell commands run alone. Edits, destructive commands and URLs need your approval.

 

## What does --allow-all-tools allow, and what does --allow-all add?

 

`--allow-all-tools` removes the prompt before a tool runs. `--allow-all-paths` will "Disable file path verification and allow access to any path." `--allow-all-urls` will "Allow access to all URLs without confirmation." So I expect path and URL checks to stay on under `--allow-all-tools` alone. The docs do not say this outright. I read it from the three separate flags. I did not test it.

 

The docs disagree on `COPILOT_ALLOW_ALL`. The flag table ties it to `--allow-all-tools`. The variables table says it equals `--allow-all`. One more detail surprised me. Set it to exactly `true` and the CLI also trusts the working directory. It then loads that folder's skills, plugins, MCP servers and hooks, "including hooks that run shell commands". Other truthy values like `1` "only auto-approve tools".

 

Inside a session the canonical command is `/permissions allow-all`. `/allow-all` and `/yolo` "remain supported as aliases".

 

## How do --allow-tool and --deny-tool work?

 

They take patterns in the form `Kind(argument)`. Kinds are `shell`, `write`, `read`, `url`, `memory` and MCP server names. Leave out the argument and the rule covers the whole kind.

 

```bash
# All git commands except push
copilot --allow-tool='shell(git:*)' --deny-tool='shell(git push)'

# One MCP tool
copilot --allow-tool='MyMCP(create_issue)'

# Block writes to one file
copilot --deny-tool='write(secret.txt)'
```

 

The allowing tools page is clear. "Deny rules always take precedence over allow rules, even when `--allow-all` is set or a matching approval has been saved in `permissions-config.json`." So `--yolo` plus a short deny list is a real setup.

 

A second layer, `--available-tools` and `--excluded-tools`, decides which tools the model even sees.

 

## Do saved approvals still apply under --allow-all?

 

They stay. When you answer a prompt with "This location", the CLI writes the approval to `~/.copilot/permissions-config.json`. The key is the Git root, or the folder if there is no repo. Permanent URL approvals go to `allowedUrls` in `~/.copilot/settings.json` and apply everywhere.

 

The docs say `--allow-tool` and `--deny-tool` "apply only to the current session and aren't written to `permissions-config.json`". I like that. A launch flag does not grow a file.

 

The saved file has limits. Per the [config directory reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference), it has no deny rules, no ask rules and no URL rules. On your own machine, the deny list lives on the command line. `/reset-allowed-tools` clears saved approvals for the current location.

 

## How do I run Copilot CLI in a script with -p?

 

`copilot -p "prompt"` runs once and exits. The command reference says `--allow-all-tools` is "Required when using the CLI programmatically". The how-to page tells you to give minimal permissions and avoid `--allow-all` outside a sandbox. Its CI example uses a narrow `--allow-tool` list. Its multi-file example uses `--allow-all-tools`. The docs do not say what `-p` does with a request no flag allows. I have not tested it.

 

The CI example in the [programmatic how-to](https://docs.github.com/en/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically) is close to what I would ship:

 

```bash
copilot -p "Run the test suite and produce a coverage summary" \
  -s --allow-tool='shell(npm:*), write' --no-ask-user
```

 

`--no-ask-user` stops the agent from asking questions. In `-p` mode, repo hooks and workspace MCP servers stay off unless the folder is trusted. `--trust-folder` trusts them for one run. It "does not grant tool, path, or URL permissions". What a `preToolUse` hook can block is in [Copilot CLI hooks](https://getagenttools.com/blog/copilot-cli-hooks/).

 

## Can an admin block --yolo in Copilot CLI?

 

Yes. Set `permissions.disableBypassPermissionsMode` to `"disable"`. Then `--allow-all-tools`, `--allow-all-paths`, `--allow-all-urls`, `--allow-all` and `--yolo` are "suppressed at startup". The slash commands are suppressed too. The value `"allow-auto-only"` blocks full allow-all but permits `/permissions assisted`, where a model judges each request. The changelog lists the setting under 1.0.55, from 28 May 2026.

 

## How does Copilot CLI compare with Claude Code and Codex?

 

| Agent | Switch | What still stops it |
| --- | --- | --- |
| Claude Code | `--dangerously-skip-permissions` | Deny rules, explicit ask rules, hook denies, the critical-path breaker |
| Codex CLI | `--dangerously-bypass-approvals-and-sandbox`, or `-a never` with a sandbox | With `-a never`, the sandbox you chose |
| Copilot CLI | `--allow-all-tools`, or `--allow-all` (`--yolo`) | `--deny-tool` rules, even under `--allow-all`; an admin policy that disables allow-all |

 

Copilot CLI also has an OS-level sandbox, `--sandbox`, for one session, covered in [Copilot CLI sandbox](https://getagenttools.com/blog/copilot-cli-sandbox/). In Codex the sandbox is its own flag next to approvals, covered in my [Codex post](https://getagenttools.com/blog/codex-dangerously-skip-permissions/). For opencode, which does accept the long flag as a hidden alias, see [opencode --dangerously-skip-permissions](https://getagenttools.com/blog/opencode-dangerously-skip-permissions/).

 

The reference says high-risk commands, like `rm -rf` or `sudo`, "display additional warnings and require explicit confirmation". It does not say if that still happens under `--allow-all-tools`. I would not count on it.

 

## Frequently asked questions

 

### Does Copilot CLI have --dangerously-skip-permissions?

 

The command reference does not list it. The Copilot names are `--allow-all-tools` for tools and `--allow-all`, or `--yolo`, for tools, paths and URLs.

 

### Is --yolo the same as --allow-all-tools in Copilot CLI?

 

No. `--yolo` equals `--allow-all`. That covers tools, paths and URLs. `--allow-all-tools` covers tools only.

 

### Does --allow-all ignore --deny-tool?

 

No. Per the docs, deny rules take precedence over allow rules, even under `--allow-all` and over saved approvals.

 

### Did you test this?

 

No. Copilot CLI is not installed on my machine. This post reads the GitHub Copilot CLI docs and the changelog up to 1.0.103 on 25 October 2026. The Claude Code and Codex rows come from my earlier posts.

 

## The verdict

 

`--allow-all` with a few `--deny-tool` rules is the Copilot version of my Claude Code advice. Use it in a container you can throw away. The deny list holds. Do not alias it. GitHub's caution box says the same.

 

Sources, read on 25 October 2026: the Copilot CLI [command reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference), [programmatic reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-programmatic-reference), [config directory reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference), the [allowing tools](https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools) and [programmatic](https://docs.github.com/en/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically) how-to pages, and the [github/copilot-cli](https://github.com/github/copilot-cli) changelog.

Put this into practice

[See the tool list](https://getagenttools.com/tools/)[Train your team](https://getagenttools.com/#training)
