github / github/copilot-cli

Copilot CLI starts in wrong working directory

未关闭
#3,528 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
area:platform-windows area:tools
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

When `copilot` is launched, the agent worker process runs in a working directory that does **not** match the directory the user launched `copilot` from. Instead, the worker's CWD is set to the per-user VS Code install folder (`C:\Users\\AppData\Local\Programs\Microsoft VS Code`).

### Affected version

GitHub Copilot CLI 1.0.55-1

### Steps to reproduce the behavior

1. Open a fresh PowerShell 7 window via Windows Terminal
2. Confirm `pwd` shows `C:\Users\`.
3. Run `agency copilot --allow-all`.
4. Ask the agent: *"What is your current working directory?"* — or have it run any tool that reports CWD.

### Expected behavior

Agent CWD is `C:\Users\` (the directory `copilot` was launched from).
## Actual

Agent CWD is `C:\Users\\AppData\Local\Programs\Microsoft VS Code\`.

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

在全新的 PowerShell 7 窗口中使用 `agency copilot --allow-all` 重现该问题,然后跟踪 CLI 的 agent worker 启动过程以及工作目录的处理方式。完成标准是 worker 报告启动 `copilot` 时所在的目录,而不是每个用户各自的 VS Code 安装文件夹。

由索引模型根据 Issue 内容生成。

评估

技术栈
powershell, vscode
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。