github / github/copilot-cli

copilot-instructions.md sometimes ignored

Open
#3,552 0 comments 0 reactions 0 assignees View on GitHub
area:configuration area:context-memory
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with the attached copilot-instructions.md and compare its “Never create a git commit autonomously” rule with the custom_instruction section described in the report. Reproduce the behavior on GitHub Copilot CLI 1.0.54 using varied difficult prompts; done means the issue is narrowed to a reliable conflicting-instruction case or the instruction is consistently honored when no commit was requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, shell
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.