github / github/copilot-cli

Feature Request: Local auto-memory (agent-initiated, no remote storage)

Aberta
#2,930 2 comentários 3 reações 0 responsáveis Ver no GitHub
area:context-memory
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

## Problem

Organizations with security concerns about remote data storage disable [Copilot Memory](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/copilot-memory) (which is off by default for enterprise/org-managed subscriptions). This leaves Copilot CLI with **no way to accumulate knowledge across sessions** — every session starts from scratch unless the user manually maintains instruction files.

Existing feature requests (#446, #667, #1912) focus on session persistence or user-driven memory. This request is specifically about **agent-initiated, local-only memory** — where the agent autonomously decides what is worth remembering and writes it to local files, similar to how [Claude Code auto memory](https://code.claude.com/docs/en/memory) works.

## Proposed Feature

A local auto-memory system where Copilot CLI:

1. **Autonomously writes learnings** during sessions — build commands discovered, conventions learned, user corrections, debugging insights, architecture notes
2. **Stores memory locally** in a per-project directory (e.g., `~/.copilot/projects//memory/`), not on GitHub servers
3. **Auto-loads memory** into future sessions so accumulated knowledge persists
4. **Uses plain markdown files** that users can audit, edit, or delete at any time

### How Claude Code does this (reference implementation)

Claude Code's auto memory is a good reference for what this could look like:

- **Storage**: `~/.claude/projects//memory/` — one directory per git repo
- **Structure**: A `MEMORY.md` index file + topic files (`debugging.md`, `api-conventions.md`, etc.)
- **Loading**: First 200 lines / 25KB of `MEMORY.md` loaded at session start; topic files read on demand
- **Agent-initiated**: The agent decides what to save based on whether the information would be useful in a future conversation — no explicit "remember this" needed
- **Editable**: Users can view, edit, or delete any memory file. Claude Code provides a `/memory` command to browse them.

### Key design principles

- **Local-only**: No data leaves the machine. This addresses the security concerns that cause organizations to disable remote Copilot Memory.
- **Per-project scoping**: Memories are tied to a git repository, so different projects don't pollute each other.
- **Agent-initiated**: The agent writes notes for itself without the user having to explicitly say "remember this." When the user corrects the agent or the agent discovers something useful (e.g., "this project uses pnpm, not npm"), it saves that automatically.
- **Complementary to custom instructions**: CLAUDE.md / `.github/copilot-instructions.md` are what the *user* writes for the agent. Auto memory is what the *agent* writes for itself.
- **Transparent**: Plain markdown, easily auditable, with a command to browse/edit (e.g., `/memory`).

## Why this matters

- **Organizations that disable remote Copilot Memory** have no alternative today. Custom instructions are manual and user-maintained — they don't capture what the agent learns during work.
- **Reduces repetitive corrections**: If a user corrects the agent ("use pnpm, not npm"), the agent should remember that for next time without the user having to add it to an instructions file.
- **Improves over time**: The agent gets better at working in a specific codebase as it accumulates project-specific knowledge.
- **No security trade-off**: All data stays on the local machine. Organizations don't have to choose between memory and data security.

## Relationship to existing features

| Feature | Who writes | Storage | Auto-initiated |
|---|---|---|---|
| `.github/copilot-instructions.md` | User | Repo (committed) | No |
| Copilot Memory (remote) | Agent | GitHub servers | Yes |
| **This proposal (local auto-memory)** | **Agent** | **Local filesystem** | **Yes** |

This feature would fill the gap for users/orgs that want agent-initiated memory but cannot or choose not to use remote storage.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

No implementation files or tests are identified. Start by reviewing the existing Copilot Memory behavior and the related requests #446, #667, and #1912, then compare the proposed ~/.copilot/projects//memory/ layout with MEMORY.md and .github/copilot-instructions.md. Done would mean an agreed design and implementation for local, per-project, agent-initiated memory with transparent Markdown storage and session loading.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Domínio
ai, cli
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.