You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update chapters 01-02 with v1.0.35/v1.0.36 features
- Add tab-completion tip for slash commands (v1.0.35)
- Add /keep-alive to session commands table (v1.0.36, now out of experimental)
- Update /session entry with delete/delete-all subcommands (v1.0.35)
- Update /resume entry to mention resuming by name (v1.0.35)
- Add double Esc behavior change to Common Mistakes table (v1.0.36)
- Add --name flag for naming sessions at startup (v1.0.35)
- Add --resume=<name> example for resuming by name (v1.0.35)
- Add /session delete subcommands to Organize Your Sessions section (v1.0.35)
- Update --continue behavior note: prefers current working directory (v1.0.35)
- Update Monday/Wednesday workflow example to use --name and --resume=<name>
- Update Key Takeaways summary to mention --name flag
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: 01-setup-and-first-steps/README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -377,6 +377,8 @@ These commands are great to learn initially as you're getting started with Copil
377
377
378
378
> 💡 **`/ask` vs regular chat**: Normally every message you send becomes part of the ongoing conversation and affects future responses. `/ask` is an "off the record" shortcut — perfect for quick one-off questions like `/ask What does YAML mean?` without polluting your session context.
379
379
380
+
> 💡 **Tab-completion**: When typing a slash command, press **Tab** to auto-complete the command name or cycle through available subcommands and arguments. This is especially handy when you can't remember the exact name of a command.
381
+
380
382
That's it for getting started! As you become comfortable, you can explore additional commands.
381
383
382
384
> 📚 **Official Documentation**: [CLI command reference](https://docs.github.com/copilot/reference/cli-command-reference) for the complete list of commands and flags.
@@ -436,12 +438,13 @@ That's it for getting started! As you become comfortable, you can explore additi
436
438
|`/clear`| Abandons the current session (no history saved) and starts a fresh conversation |
437
439
|`/compact`| Summarize conversation to reduce context usage |
438
440
|`/context`| Show context window token usage and visualization |
441
+
|`/keep-alive`| Prevent your system from sleeping while Copilot CLI is active — handy for long-running tasks on a laptop |
439
442
|`/new`| Ends the current session (saving it to history for search/resume) and starts a fresh conversation. |
440
-
|`/resume`| Switch to a different session (optionally specify session ID) |
443
+
|`/resume`| Switch to a different session (optionally specify session ID or name) |
441
444
|`/rename`| Rename the current session (omit the name to auto-generate one) |
442
445
|`/rewind`| Open a timeline picker to roll back to any earlier point in the conversation |
443
446
|`/usage`| Display session usage metrics and statistics |
444
-
|`/session`| Show session info and workspace summary |
447
+
|`/session`| Show session info and workspace summary; use `/session delete`, `/session delete <id>`, or `/session delete-all` to remove sessions|
445
448
|`/share`| Export session as a markdown file, GitHub gist, or self-contained HTML file |
446
449
447
450
### Display
@@ -645,6 +648,7 @@ The examples used `/plan` for a search feature and `-p` for batch reviews. Now t
645
648
| Typing `exit` instead of `/exit`| Copilot CLI treats "exit" as a prompt, not a command| Slash commands always start with `/`|
646
649
| Using `-p`for multi-turn conversations | Each `-p` call is isolated with no memory of previous calls | Use interactive mode (`copilot`) for conversations that build on context |
647
650
| Forgetting quotes around prompts with `$` or `!`| Shell interprets special characters before Copilot CLI sees them | Wrap prompts in quotes: `copilot -p "What does $HOME mean?"`|
651
+
| Pressing Esc once to cancel a running task | A single Esc no longer cancels in-flight work (to prevent accidents) | Press **Esc twice** to cancel while Copilot CLI is processing |
Copy file name to clipboardExpand all lines: 02-context-conversations/README.md
+31-9Lines changed: 31 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,11 +305,14 @@ copilot --resume
305
305
306
306
# Or resume a specific session by ID
307
307
copilot --resume abc123
308
+
309
+
# Or resume by the name you gave the session
310
+
copilot --resume=book-app-review
308
311
```
309
312
310
313
> 💡 **How do I find a session ID?** You don't need to memorize them. Running `copilot --resume` without an ID shows an interactive list of your previous sessions, their names, IDs, and when they were last active. Just pick the one you want.
311
314
>
312
-
> **What about multiple terminals?** Each terminal window is its own session with its own context. If you have Copilot CLI open in three terminals, that's three separate sessions. Running `--resume` from any terminal lets you browse all of them. The `--continue` flag grabs whichever session was closed most recently, no matter which terminal it was in.
315
+
> **What about multiple terminals?** Each terminal window is its own session with its own context. If you have Copilot CLI open in three terminals, that's three separate sessions. Running `--resume` from any terminal lets you browse all of them. The `--continue` flag grabs the session from the current working directory first; if none exists there, it picks the most recently active session.
313
316
>
314
317
> **Can I switch sessions without restarting?** Yes. Use the `/resume` slash command from inside an active session:
315
318
> ```
@@ -319,15 +322,35 @@ copilot --resume abc123
319
322
320
323
### Organize Your Sessions
321
324
322
-
Give sessions meaningful names so you can find them later:
325
+
Give sessions meaningful names so you can find them later. You can name a session when you start it, or rename it at any time while inside the session:
323
326
324
327
```bash
328
+
# Name a session right when you start it
329
+
copilot --name book-app-review
330
+
331
+
# Or rename the current session from inside
325
332
copilot
326
333
327
334
> /rename book-app-review
328
335
# Session renamed for easier identification
329
336
```
330
337
338
+
Once a session is named, you can resume it directly by name without browsing through a list:
339
+
340
+
```bash
341
+
copilot --resume=book-app-review
342
+
```
343
+
344
+
To clean up sessions you no longer need, use `/session delete` from inside a session:
345
+
346
+
```bash
347
+
copilot
348
+
349
+
> /session delete # Deletes the current session
350
+
> /session delete abc123 # Deletes a specific session by ID
351
+
> /session delete-all # Deletes all sessions (use with care!)
352
+
```
353
+
331
354
### Check and Manage Context
332
355
333
356
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:
# Monday: Start book app review with a name right from the beginning
390
+
copilot --name book-app-review
368
391
369
-
> /rename book-app-review
370
392
> @samples/book-app-project/books.py
371
393
> Review and number all code quality issues
372
394
@@ -384,8 +406,8 @@ Quality Issues Found:
384
406
```
385
407
386
408
```bash
387
-
# Wednesday: Resume exactly where you left off
388
-
copilot --continue
409
+
# Wednesday: Resume exactly where you left off, by name
410
+
copilot --resume=book-app-review
389
411
390
412
> What issues remain unfixed from our book app review?
391
413
@@ -410,7 +432,7 @@ No re-explaining. No re-reading files. Just continue working.
410
432
411
433
---
412
434
413
-
**🎉 You now know the essentials!** The `@` syntax, session management (`--continue`/`--resume`/`/rename`), and context commands (`/context`/`/clear`) are enough to be highly productive. Everything below is optional. Return to it when you're ready.
435
+
**🎉 You now know the essentials!** The `@` syntax, session management (`--name`/`--continue`/`--resume`/`/rename`), and context commands (`/context`/`/clear`) are enough to be highly productive. Everything below is optional. Return to it when you're ready.
1. **`@` syntax** gives Copilot CLI context about files, directories, and images
860
882
2. **Multi-turn conversations** build on each other as context accumulates
861
-
3. **Sessions auto-save**: use `--continue` or `--resume`to pick up where you left off
883
+
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
862
884
4. **Context windows** have limits: manage them with `/clear`, `/compact`, `/context`, `/new`, and `/rewind`
863
885
5. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely!
864
886
6. **Image references** (`@screenshot.png`) help debug UI issues visually
0 commit comments