github / github/copilot-cli

Non-interactive sessions bypass `disableBypassPermissionsMode` managed setting

Open
#4,528 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:enterprise area:non-interactive area:permissions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the bug

Non-interactive (-p / --prompt) with --allow-all / --yolo grant permissions automatically even when .github-private/copilot/managed-settings.json is configured with:

{
  "permissions": {
    "disableBypassPermissionsMode": "disable"
  }
}

Attempting to run /allow-all / /yolo within the interactive shell correctly states:

Bypass permissions mode has been disabled by policy. Contact your administrator for more information.

Affected version

1.0.80

Steps to reproduce the behavior
  1. Configure "disableBypassPermissionsMode": "disable".
  2. Pass --yolo -p {prompt} to copilot CLI.
Expected behavior

yolo mode is ignored and tool calls are denied.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the CLI handles -p/--prompt together with --allow-all/--yolo, then compare that path with the interactive /allow-all policy check. Use .github-private/copilot/managed-settings.json with disableBypassPermissionsMode set to disable; done means non-interactive tool calls are denied just as they are in the interactive shell.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
authorization, cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.