github / github/copilot-cli

/instructions command does not show ~/.copilot/instructions/*.instructions.md user-level files

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

Beschreibung

### Describe the bug

The `/instructions` command shows an empty picker ("No instructions") even when user-level instruction files exist at `~/.copilot/instructions/*.instructions.md`.

The CLI help text lists `\C:\Users\Eric/.copilot/copilot-instructions.md` as a respected location, and the v0.0.412 changelog confirms `~/.copilot/instructions/*.instructions.md` support was added — but **neither location appears in the `/instructions` picker**.

### Affected version

`GitHub Copilot CLI 1.0.22`

### Steps to reproduce the behavior

1. Create `~/.copilot/instructions/global.instructions.md` with any content (no frontmatter)
2. Launch `copilot` in any directory (tested both git repo and non-git directory)
3. Run `/instructions`
4. **Observed:** picker is empty — the file is not listed

Also reproduced with the legacy `~/.copilot/copilot-instructions.md` path — also not shown.

### Expected behavior

`/instructions` should list `~/.copilot/instructions/global.instructions.md` with an `[external]` label, as suggested by the v1.0.4 changelog entry:

> "Show individual instruction file names in /instructions picker with [external] labels for injected files"

The instructions **are** being injected into prompts (the CLI help text and docs confirm these paths are respected), but the files are invisible to the `/instructions` picker.

### Additional context

- **OS:** Windows 11
- **Terminal:** Windows Terminal
- **Shell:** PowerShell 7
- The user-level instructions **do** appear to be loaded (content is reflected in agent behavior), so this is a display/enumeration bug in the `/instructions` command specifically
- Possibly related: the issue may be worse or exclusive to non-git-repo working directories — `/instructions` may only enumerate files discovered via git-root traversal, inadvertently skipping the user-level `~/.copilot/instructions/` directory

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, /instructions mit benutzerebenen Dateien unter ~/.copilot/instructions/*.instructions.md und ~/.copilot/copilot-instructions.md sowohl in Git- als auch in Nicht-Git-Verzeichnissen zu reproduzieren. Verfolge anschließend die Pfade zur Erkennung von Instructions und zur Enumeration im Picker und überprüfe dann, dass erkannte Dateien auf Benutzerebene mit [external]-Labels erscheinen, während die bestehende Prompt-Injection weiterhin funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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