Skip to content

Commit c87299d

Browse files
DanWahlinCopilot
andauthored
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>
1 parent aafa90a commit c87299d

2 files changed

Lines changed: 37 additions & 11 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ These commands are great to learn initially as you're getting started with Copil
377377

378378
> 💡 **`/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.
379379
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+
380382
That's it for getting started! As you become comfortable, you can explore additional commands.
381383

382384
> 📚 **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
436438
| `/clear` | Abandons the current session (no history saved) and starts a fresh conversation |
437439
| `/compact` | Summarize conversation to reduce context usage |
438440
| `/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 |
439442
| `/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) |
441444
| `/rename` | Rename the current session (omit the name to auto-generate one) |
442445
| `/rewind` | Open a timeline picker to roll back to any earlier point in the conversation |
443446
| `/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 |
445448
| `/share` | Export session as a markdown file, GitHub gist, or self-contained HTML file |
446449

447450
### Display
@@ -645,6 +648,7 @@ The examples used `/plan` for a search feature and `-p` for batch reviews. Now t
645648
| Typing `exit` instead of `/exit` | Copilot CLI treats "exit" as a prompt, not a command | Slash commands always start with `/` |
646649
| 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 |
647650
| 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 |
648652
649653
### Troubleshooting
650654

02-context-conversations/README.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,14 @@ copilot --resume
305305
306306
# Or resume a specific session by ID
307307
copilot --resume abc123
308+
309+
# Or resume by the name you gave the session
310+
copilot --resume=book-app-review
308311
```
309312
310313
> 💡 **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.
311314
>
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.
313316
>
314317
> **Can I switch sessions without restarting?** Yes. Use the `/resume` slash command from inside an active session:
315318
> ```
@@ -319,15 +322,35 @@ copilot --resume abc123
319322
320323
### Organize Your Sessions
321324
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:
323326
324327
```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
325332
copilot
326333
327334
> /rename book-app-review
328335
# Session renamed for easier identification
329336
```
330337
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+
331354
### Check and Manage Context
332355
333356
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:
@@ -363,10 +386,9 @@ Context usage: 62k/200k tokens (31%)
363386
Imagine this workflow across multiple days:
364387
365388
```bash
366-
# Monday: Start book app review
367-
copilot
389+
# Monday: Start book app review with a name right from the beginning
390+
copilot --name book-app-review
368391
369-
> /rename book-app-review
370392
> @samples/book-app-project/books.py
371393
> Review and number all code quality issues
372394
@@ -384,8 +406,8 @@ Quality Issues Found:
384406
```
385407
386408
```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
389411
390412
> What issues remain unfixed from our book app review?
391413
@@ -410,7 +432,7 @@ No re-explaining. No re-reading files. Just continue working.
410432
411433
---
412434
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.
414436
415437
---
416438
@@ -858,7 +880,7 @@ copilot --add-dir /path/to/directory
858880
859881
1. **`@` syntax** gives Copilot CLI context about files, directories, and images
860882
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
862884
4. **Context windows** have limits: manage them with `/clear`, `/compact`, `/context`, `/new`, and `/rewind`
863885
5. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely!
864886
6. **Image references** (`@screenshot.png`) help debug UI issues visually

0 commit comments

Comments
 (0)