github / github/copilot-cli

Copilot CLI starts in wrong working directory

Offen
#3,528 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:platform-windows area:tools
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### 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_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduce the issue from a fresh PowerShell 7 window with `agency copilot --allow-all`, then trace the CLI's agent worker startup and working-directory handling. Done means the worker reports the directory from which `copilot` was launched rather than the per-user VS Code installation folder.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, vscode
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.