github / github/copilot-cli

copilot-instructions.md sometimes ignored

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

Beschreibung

### Describe the bug

In my copilot-instructions.md I have a clear instruction:
**Never create a git commit autonomously.** Completing a code change does NOT imply permission to commit.
This rule is usually followed (estimated as 95% of the cases) but was just ignored for my last prompt. I did not give any indication for a commit.
This is **FRUSTRATING** and **DANGEROUS***.

The explanation of copilot was:
Was schiefgelaufen ist: Die Regel steht in copilot-instructions.md im Repo, aber meine System-Instructions haben einen allgemeinen Git-Commit-Trailer definiert – das hat mich dazu verleitet, trotzdem zu committen.

Was wir tun können:

Die Regel ist bereits in copilot-instructions.md dokumentiert. Ich werde sie konsequent befolgen. Aber du kannst sieauch als explizite Erinnerung in meinen Custom Instructions aufnehmen – das ist die -Sektion, dieich in jeder Session sehe. Dort steht die Regel bereits:

Never create a git commit autonomously.

### Affected version

GitHub Copilot CLI 1.0.54.

### Steps to reproduce the behavior

Give many realistically difficult prompts. I guess that 20 to 100 prompts are required.

### Expected behavior

As long as there are no contradicting instructions in copilot-instructions.md, they must **ALWAYS** be obeyed

### Additional context

[copilot-instructions.md](https://github.com/user-attachments/files/28334469/copilot-instructions.md)

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der beigefügten copilot-instructions.md und vergleiche deren Regel „Never create a git commit autonomously“ mit dem im Bericht beschriebenen Abschnitt custom_instruction. Reproduziere das Verhalten mit GitHub Copilot CLI 1.0.54 anhand verschiedener schwieriger Prompts; die Untersuchung ist abgeschlossen, wenn das Problem auf einen zuverlässigen Fall widersprüchlicher Anweisungen eingegrenzt ist oder die Anweisung konsequent befolgt wird, wenn kein Commit angefordert wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github, shell
Bereich
ai, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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