Skip to content

Commit 8788c5d

Browse files
docs: update Learning Hub with CLI v1.0.40–v1.0.41 features (#1626)
Add documentation for features shipped in Copilot CLI v1.0.40 and the v1.0.41 prerelease builds that weren't yet covered in the Hub: - copilot-configuration-basics.md: document --attachment flag for attaching images/documents in prompt mode (-p) - automating-with-hooks.md: extend the prompt mode security callout to cover the new GITHUB_COPILOT_PROMPT_MODE_EXTENSIONS env var (user extensions load by default; project extensions need opt-in) - building-custom-agents.md: note that ACP clients receive the agent's live plan in real time for multi-step tasks (v1.0.40+) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ce51668 commit 8788c5d

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

website/src/content/docs/learning-hub/automating-with-hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Automating with Hooks'
33
description: 'Learn how to use hooks to automate lifecycle events like formatting, linting, and governance checks during Copilot agent sessions.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-05-04
6+
lastUpdated: 2026-05-05
77
estimatedReadingTime: '8 minutes'
88
tags:
99
- hooks
@@ -277,7 +277,7 @@ exit 1 # deny (let the user decide interactively)
277277
> ```bash
278278
> GITHUB_COPILOT_PROMPT_MODE_REPO_HOOKS=true copilot -p "..." --no-ask-user
279279
> ```
280-
> This is a secure-by-default change: it prevents untrusted repository hooks from firing silently when a user runs a quick prompt command in an unfamiliar repository. Similarly, workspace MCP servers are disabled in prompt mode by default; opt in with `GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`.
280+
> This is a secure-by-default change: it prevents untrusted repository hooks from firing silently when a user runs a quick prompt command in an unfamiliar repository. Similarly, workspace MCP servers are disabled in prompt mode by default; opt in with `GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`. Extensions follow a mixed model (v1.0.41+): **user-level extensions** (from `~/.copilot/`) load automatically in prompt mode, but **project-level extensions and management tools** are disabled by default — opt in with `GITHUB_COPILOT_PROMPT_MODE_EXTENSIONS=true` to load them.
281281
282282
### Handling Tool Failures with postToolUseFailure
283283

website/src/content/docs/learning-hub/building-custom-agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Building Custom Agents'
33
description: 'Learn how to create specialized GitHub Copilot agents with custom personas, tool integrations, and domain expertise.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-05-04
6+
lastUpdated: 2026-05-05
77
estimatedReadingTime: '10 minutes'
88
tags:
99
- agents
@@ -264,7 +264,7 @@ Keep agents focused—one persona per file. If you find an agent trying to do to
264264

265265
A: In VS Code, open Copilot Chat and use the agent picker dropdown at the top of the chat panel. Your custom agents appear alongside built-in options. You can also `@mention` an agent by name.
266266

267-
In Copilot CLI, custom agents are discoverable via the agent picker inside a session. Clients that integrate with Copilot CLI using the **Agent Coordination Protocol (ACP)** can also list available custom agents and switch between them programmatically via the `agent` session configuration option (v1.0.40+). This allows tools like Zed, Neovim plugins, and CI pipelines driving Copilot via ACP to surface the agent picker and switch agents without requiring a slash command.
267+
In Copilot CLI, custom agents are discoverable via the agent picker inside a session. Clients that integrate with Copilot CLI using the **Agent Coordination Protocol (ACP)** can also list available custom agents and switch between them programmatically via the `agent` session configuration option (v1.0.40+). This allows tools like Zed, Neovim plugins, and CI pipelines driving Copilot via ACP to surface the agent picker and switch agents without requiring a slash command. ACP clients also receive the agent's **live plan** as it works through multi-step tasks (v1.0.40+), so they can display real-time progress to their users without waiting for each turn to complete.
268268

269269
**Q: Can agents use skills?**
270270

website/src/content/docs/learning-hub/copilot-configuration-basics.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Copilot Configuration Basics'
33
description: 'Learn how to configure GitHub Copilot at user, workspace, and repository levels to optimize your AI-assisted development experience.'
44
authors:
55
- GitHub Copilot Learning Hub Team
6-
lastUpdated: 2026-05-01
6+
lastUpdated: 2026-05-05
77
estimatedReadingTime: '10 minutes'
88
tags:
99
- configuration
@@ -581,6 +581,16 @@ copilot --autopilot --max-autopilot-continues 10 "Refactor the authentication mo
581581

582582
Set it higher for long-running tasks, or lower for tasks where you want more frequent checkpoints. Setting it to `0` disables automatic continuation entirely.
583583

584+
The `--attachment` flag (available in prompt mode, `-p`) lets you attach files — images or native documents — to the initial prompt in non-interactive mode:
585+
586+
```bash
587+
copilot -p "Summarize the architecture shown in these diagrams" \
588+
--attachment arch-overview.png \
589+
--attachment data-flow.pdf
590+
```
591+
592+
This is useful in automated pipelines where you want to pass visual or document context (screenshots, design specs, PDF reports) to the model without interactive file selection. Multiple `--attachment` flags can be specified to include several files at once.
593+
584594
The `COPILOT_HOME` environment variable sets the Copilot CLI configuration directory. It is the preferred replacement for the `--config-dir` flag, which is deprecated:
585595

586596
```bash

0 commit comments

Comments
 (0)