Windows sandbox: git status fails with working-directory permission denied despite allowed paths
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the bug
Copilot CLI continues to encounter filesystem access denials after I updated sandbox settings to allow access, including C:\Users\vineset . The effective policy has not been verified, so this may be a sandbox policy-application or process working-directory issue.
Environment: Windows; Copilot CLI 1.0.81-1 .
Steps to reproduce:
- Open a CLI session in a Git repository on the D: drive.
- Configure sandbox read/write permissions to allow the required paths.
- Ask the agent to run git -C "D:<repo>" status --short --branch .
- Update the sandbox permissions and retry in the same session.
Expected: Git reads the allowed repository and returns its status.
Actual: Every attempt fails with exit code 128:
fatal: Unable to read current working directory: Permission denied
Supporting observations:
- PowerShell successfully listed the repository and confirmed that .git exists.
- An earlier process-launch error reported C:\ as its working directory, although the session was configured for the repository on D:.
- Plugin management also failed to initialize logging because access to a file under %LOCALAPPDATA%\agency\logs was denied.
- The Git error does not identify the blocked path, making it difficult to determine which permission is missing.
Impact: Unable to run even read-only Git status operations; repository updates and plugin management are also blocked.
Please investigate: Whether tool processes inherit the correct working directory, whether sandbox setting changes reach subsequent processes in the current session, and whether an additional restriction overrides the configured allowed paths. If a restart is required, please make that explicit in the settings UI. Denial messages should identify the affected path and policy rule.
Uncertainty: The exact root cause is not established, and reproduction after a full CLI restart has not been confirmed.
Affected version
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、D: ドライブ上のリポジトリで Windows CLI セッションを再現し、報告された git -C "D:<repo>" status --short --branch コマンドを実行します。同じセッション内での sandbox 権限の変更と再起動後の変更を比較し、継承された作業ディレクトリ、および %LOCALAPPDATA%\agency\logs へのアクセスを確認します。原因が特定され、拒否メッセージまたは設定の動作によって、必要なパスと再起動状態が明示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, powershell, shell
- 領域
- cli, security
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 38/100