Describe the bug
Just got the latest version of enforced-sandbox copilot and it turns out it's super broken and overly restrictive. I enabled my entire working directory and ~/.copilot because agents no longer had a way to share information across sessions. Then I found that even though it could now read the files it couldn't even run git status. I checked and the /cwd is the git repo but when it runs git status it gets a "fatal: not a git repository (or any of the parent directories): .git" error.
I can't even do it by ! git status in shell mode as I get the same. If it uses git -C <repo> status it does a slightly different error of "fatal: Unable to read current working directory: Permission denied".
I ran ! pwd and see that it's C:\ which of course is not a great place to add to your policy if you want to keep the pc safe. So can we not have powershell run in the allowed directory? This seems like the logical thing to do instead of starting at root and failing all git commands.
Affected version
1.0.81-1
Steps to reproduce the behavior
- Get forced into sandboxing via enterprise managed systems
- Ask the agent to do a git command like
git status (fails)
- Run
Shell Get-Item 'path/to/.git' where path is on not C:/ and it fails saying "Get-Item: Cannot find drive. A drive with the name 'E' does not exist."
Expected behavior
I was expecting it wouldn't fail to do such a simple command. It doesn't if I do the exact same command outside of copilot. It worked before the update.
Additional context

Describe the bug
Just got the latest version of enforced-sandbox copilot and it turns out it's super broken and overly restrictive. I enabled my entire working directory and ~/.copilot because agents no longer had a way to share information across sessions. Then I found that even though it could now read the files it couldn't even run git status. I checked and the /cwd is the git repo but when it runs
git statusit gets a "fatal: not a git repository (or any of the parent directories): .git" error.I can't even do it by
! git statusin shell mode as I get the same. If it usesgit -C <repo> statusit does a slightly different error of "fatal: Unable to read current working directory: Permission denied".I ran
! pwdand see that it'sC:\which of course is not a great place to add to your policy if you want to keep the pc safe. So can we not have powershell run in the allowed directory? This seems like the logical thing to do instead of starting at root and failing all git commands.Affected version
1.0.81-1
Steps to reproduce the behavior
git status(fails)Shell Get-Item 'path/to/.git'where path is on not C:/ and it fails saying "Get-Item: Cannot find drive. A drive with the name 'E' does not exist."Expected behavior
I was expecting it wouldn't fail to do such a simple command. It doesn't if I do the exact same command outside of copilot. It worked before the update.
Additional context