Skip to content

Permission denied and could not request permission from user #176

@doggy8088

Description

@doggy8088

Describe the bug

I'm on Windows. Using PowerShell 7.5.3.

I run this command:

copilot --allow-all-tools -p (Get-Content '$PSScriptRoot\Prompt.txt' -Raw)"

When LLM write a PowerShell script and run it, such as:

$html = Get-Content anthropic_article.html -Raw; $html -replace '<[^>]+>','' -replace '\s+', '' | Select-String -Pattern 'Effective context engineering.*?(?=Share this article)' | ForEach-Object { $_.Matches.Value } | Out-String | Select-Object -First 3000

It will fail like this screenshot:

Image

I already provided --allow-all-tools flag. It should work, right?

Affected version

0.0.332 Commit: ace227c

Steps to reproduce the behavior

echo 123 > a.txt

copilot --allow-all-tools -p @'
Run the following PowerShell command and summary $html's content.

$html = Get-Content a.txt -Raw; $html -replace '<[^>]+>','' -replace '\s+', '' | Select-String -Pattern 'Effective context engineering.*?(?=Share this article)' | ForEach-Object { $_.Matches.Value } | Out-String | Select-Object -First 3000
'@
Image

Expected behavior

I expect any powershell script should be able to run.

Additional context

  • There is no meaningful logs for my issue.
  • Operating system: Windows 10
  • CPU architecture: x86_64
  • Terminal emulator: Windows Terminal
  • Shell: pwsh (PowerShell 7.5.3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:permissionsTool approval, security boundaries, sandbox mode, and directory restrictions

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions