github / github/copilot-cli

Feature Request: Add admin controls to manage repo-wide memories (delete, audit)

Aperta
#1,719 0 commenti 7 reazioni 0 assegnatari Vedi su GitHub
area:context-memory
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

## Problem

The Copilot CLI agent can autonomously store "repo-wide memories" — facts it learns during a session that persist and are loaded into **every future session for all users** in the repository. There is currently:

- **No way to delete** a memory once stored
- **No admin controls** to manage memories across a repository
- **No user attribution** — memories don't record who triggered them
- **No user approval** — the agent decides on its own what to memorize

This creates a serious problem: **any user can unintentionally pollute the repo-wide memory with user-specific preferences, jokes, or offhand comments**, and there is no mechanism to clean them up.

## Real-World Example

In [Azure/azure-sdk-for-net](https://github.com/Azure/azure-sdk-for-net), a user jokingly told the agent to add a specific footer (`🤖 m-nash-copilot`) to PR comments. The agent:

1. Took this literally and stored it as a **repo-wide memory**: *"All PR/issue comments written on behalf of the user must end with `\n---\n🤖 m-nash-copilot`"*
2. This memory was then loaded into **every other user's sessions** across the entire repo
3. When the official Copilot reviewer bot later left a comment on an unrelated PR, it included the `m-nash-copilot` footer — visible here: https://github.com/Azure/azure-sdk-for-net/pull/56515#discussion_r2862313920
4. Another user (`live1206`) had to ask *"why did you add '🤖 m-nash-copilot' in the end of the comment? I am not m-nash"*
5. This triggered a **second** contradictory memory to be stored, and neither can be deleted

The only "fix" available today is storing yet another memory to override the bad ones — which just adds more clutter.

## Requested Features

### P0 — Memory Management
- Ability for repo admins to **delete individual memories**

### P1 — User Attribution & Audit
- Record **which user** stored each memory and **when**
- Provide an audit log of memory additions

### P2 — Guardrails on Memory Storage
- Require **user confirmation** before the agent stores a repo-wide memory (e.g., "I'd like to remember this for all users in this repo. OK?")
- Distinguish between **user-scoped preferences** (only loaded for that user) and **repo-scoped conventions** (loaded for everyone)
- Allow users to set a repo-level policy to disable autonomous memory storage

## Impact

This affects any repository with multiple Copilot CLI users. Without these controls:
- One user's offhand remark can change agent behavior for the entire team
- There is no way to audit or clean up what's been stored
- The only workaround (storing corrective memories) adds noise without removing the original problem
- Trust in the agent's behavior is undermined when it acts on stale or incorrect memories

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.