Skip to content

Commit 96890dc

Browse files
authored
Merge pull request #141 from github/update/cli-v1.0.49-1.0.54-features-3b534790f14023c7
[bot] Add /security-review, /memory, and /compact focus instructions (CLI v1.0.49–1.0.52)
2 parents de99f17 + 02e3dfa commit 96890dc

3 files changed

Lines changed: 47 additions & 5 deletions

File tree

01-setup-and-first-steps/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,14 +436,15 @@ That's it for getting started! As you become comfortable, you can explore additi
436436
| Command | What It Does |
437437
|---------|--------------|
438438
| `/clear` | Abandons the current session (no history saved) and starts a fresh conversation |
439-
| `/compact` | Summarize conversation to reduce context usage |
439+
| `/compact` | Summarize conversation to reduce context usage (optionally add focus instructions, e.g. `/compact focus on the bug list`) |
440440
| `/context` | Show context window token usage and visualization |
441441
| `/keep-alive` | Prevent your system from sleeping while Copilot CLI is active — handy for long-running tasks on a laptop |
442+
| `/memory [on\|off\|show]` | Enable, disable, or view persistent memory — facts and preferences remembered across all sessions |
442443
| `/new` | Ends the current session (saving it to history for search/resume) and starts a fresh conversation. |
443444
| `/resume` | Switch to a different session (optionally specify session ID or name) |
444445
| `/rename` | Rename the current session (omit the name to auto-generate one) |
445446
| `/rewind` | Open a timeline picker to roll back to any earlier point in the conversation |
446-
| `/usage` | Display session usage metrics and statistics |
447+
| `/usage` | Display session usage metrics and statistics, including quota progress bars |
447448
| `/session` | Show session info and workspace summary; use `/session delete`, `/session delete <id>`, or `/session delete-all` to remove sessions |
448449
| `/share` | Export session as a markdown file, GitHub gist, or self-contained HTML file |
449450

02-context-conversations/README.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,29 @@ copilot
351351
> /session delete-all # Deletes all sessions (use with care!)
352352
```
353353
354+
### Persistent Memory Across Sessions
355+
356+
Sessions save your conversation history, but **memory** goes one step further and lets Copilot CLI remember preferences and facts *across all sessions*, not just within a single one.
357+
358+
```bash
359+
copilot
360+
361+
> /memory show
362+
# Shows what Copilot CLI currently remembers about you and your project
363+
364+
> /memory on
365+
# Enables memory (on by default if your account supports it)
366+
367+
> /memory off
368+
# Disables memory (useful if you prefer a fresh slate each time)
369+
```
370+
371+
For example, if you tell Copilot CLI "I always prefer pytest for Python testing", it can remember that preference and apply it automatically in future sessions. All without you having to repeat it.
372+
373+
> 💡 **Memory vs. Sessions**: Sessions save the *conversation history* so you can resume a specific task. Memory saves *preferences and context* that apply across all your work. Think of sessions as project notebooks and memory as your personal notepad.
374+
375+
> 🔒 **Privacy note**: Memory is scoped either to your user account (visible to you across all repos) or to a specific repository (shared with collaborators). The CLI tells you which scope applies whenever it stores something.
376+
354377
### Check and Manage Context
355378
356379
As you add files and conversation, Copilot CLI's [context window](../GLOSSARY.md#context-window) fills up. Several commands are available to help you stay in control:
@@ -588,6 +611,17 @@ copilot
588611
# Your key findings and decisions are preserved
589612
```
590613
614+
You can also give `/compact` optional focus instructions to shape what gets prioritized in the summary:
615+
616+
```bash
617+
copilot
618+
619+
> /compact focus on the list of bugs we found and decisions made
620+
# Summarizes history, keeping bug list and decisions prominent
621+
```
622+
623+
> 💡 **When to use focus instructions**: If your conversation covered many topics, focus instructions help `/compact` retain the parts most relevant to your next steps so you don't lose the thread.
624+
591625
#### Context Efficiency Tips
592626
593627
| Situation | Action | Why |
@@ -881,9 +915,10 @@ copilot --add-dir /path/to/directory
881915
1. **`@` syntax** gives Copilot CLI context about files, directories, and images
882916
2. **Multi-turn conversations** build on each other as context accumulates
883917
3. **Sessions auto-save**: name them at startup with `--name`, resume by name with `--resume=<name>`, or use `--continue` to pick up the most recent session
884-
4. **Context windows** have limits: manage them with `/clear`, `/compact`, `/context`, `/new`, and `/rewind`
885-
5. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely!
886-
6. **Image references** (`@screenshot.png`) help debug UI issues visually
918+
4. **Context windows** have limits: manage them with `/clear`, `/compact`, `/context`, `/new`, and `/rewind`. Use `/compact focus on <topic>` to shape what gets kept in the summary
919+
5. **Persistent memory** (`/memory`) lets Copilot CLI remember preferences and facts across *all* sessions — not just the current one
920+
6. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely!
921+
7. **Image references** (`@screenshot.png`) help debug UI issues visually
887922
888923
> 📚 **Official Documentation**: [Use Copilot CLI](https://docs.github.com/copilot/how-tos/copilot-cli/use-copilot-cli) for the complete reference on context, sessions, and working with files.
889924

GLOSSARY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ Model Context Protocol. A standard for connecting AI assistants to external data
7676

7777
---
7878

79+
### Memory (Copilot CLI)
80+
81+
A feature that lets Copilot CLI remember facts and preferences *across all sessions*, not just within a single one. Unlike session history (which saves a specific conversation), memory persists globally and is applied automatically in future sessions. Managed with the `/memory` slash command (`/memory on`, `/memory off`, `/memory show`). Memory can be scoped to your user account (visible across all repositories) or to a specific repository (shared with collaborators).
82+
83+
---
84+
7985
## N
8086

8187
### npx

0 commit comments

Comments
 (0)