Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions website/src/content/docs/learning-hub/agents-and-subagents.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Agents and Subagents'
description: 'Learn how delegated subagents differ from primary agents, when to use them, and how to launch them in VS Code and Copilot CLI.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-05-07
lastUpdated: 2026-06-23
estimatedReadingTime: '9 minutes'
tags:
- agents
Expand Down Expand Up @@ -134,20 +134,52 @@ The important behavior is different from a single chat turn:

That makes `/fleet` a practical way to launch subagents even if you are not authoring custom agent files yourself.

### Rubber-duck agent (experimental)
### Rubber-duck agent

Available in `/experimental` (v1.0.42+), the **rubber-duck agent** applies a novel multi-model pattern: when you're working in a GPT-powered session, the rubber-duck agent internally routes certain requests through Claude to provide a second perspective. The idea is similar to rubber-duck debugging — talking through a problem with a different "listener" often surfaces assumptions or blind spots you didn't notice.
The **rubber-duck agent** applies a novel multi-model pattern: when you're working in a GPT-powered session, the rubber-duck agent internally routes certain requests through Claude to provide a second perspective. The idea is similar to rubber-duck debugging — talking through a problem with a different "listener" often surfaces assumptions or blind spots you didn't notice.

To try it, enable experimental features and then select the rubber-duck agent from the agent picker:
As of v1.0.58, the rubber-duck agent is **enabled by default**. You can disable it with:

```bash
copilot config set builtInAgents.rubberDuck false
```

Or control whether it activates automatically without being explicitly invoked:

```bash
copilot config set builtInAgents.rubberDuckAutoInvoke false
```

To manually select it from the agent picker:

```
/experimental # toggle experimental features
/agent # open the agent picker and select rubber-duck
```

Because it runs as a sub-agent layer rather than replacing your primary model, you keep your current session model and context while the rubber-duck analysis runs in the background.

> **Note**: This is an experimental feature and may change. Provide feedback via `/feedback` if you find it useful.
### Configuring subagent model and reasoning (v1.0.62+)

You can configure the default model, reasoning effort, and context tier for all built-in subagents via user settings or the `/subagents` picker (also accessible as `/agents`):

- **Model**: Set a different AI model for subagent work (e.g., a faster model for research tasks)
- **Reasoning effort**: Control how much reasoning budget subagents use (`low`, `medium`, `high`)
- **Context tier**: Select the context window size subagents operate with

Open the picker from within a session:

```
/subagents # or /agents — opens the subagent configuration picker
```

Or configure via settings:

```bash
copilot config set subagents.model claude-sonnet-4
copilot config set subagents.reasoningEffort low
```

This is particularly useful when you want fast, lightweight subagents for research and exploration, while keeping a higher-capability model for the main session.

## Orchestration patterns that work well

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ title: 'Automating with Hooks'
description: 'Learn how to use hooks to automate lifecycle events like formatting, linting, and governance checks during Copilot agent sessions.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-05-08
lastUpdated: 2026-06-23
estimatedReadingTime: '8 minutes'
tags:
- hooks
- automation
- github-actions
- fundamentals
relatedArticles:
- ./building-custom-agents.md
Expand Down Expand Up @@ -182,7 +183,10 @@ Hooks support two types: `"command"` for running local shell scripts, and `"http

**matcher** *(optional)*: A regular expression matched against the tool name. When present, the hook only fires for tools whose name fully matches the regex. For example, `"^bash$"` ensures the hook only runs for the `bash` tool, not for `edit` or other tools. This is particularly useful for `preToolUse` and `postToolUse` hooks where you want to target a specific tool.

> **Important (v1.0.36+)**: Prior to v1.0.36, the `matcher` field was silently ignored — hooks with a `matcher` fired for all tool calls regardless of the regex. After upgrading to v1.0.36 or later, only tool calls whose name fully matches the `matcher` regex will trigger the hook. Review any existing `preToolUse`/`postToolUse` hooks that use `matcher` to ensure they still fire as expected.
> **Important**: The `matcher` field behavior has been refined across versions:
> - **Prior to v1.0.36**: `matcher` was silently ignored — hooks fired for all tool calls regardless of the regex.
> - **v1.0.36+**: `preToolUse` matchers are correctly enforced.
> - **v1.0.63+**: `postToolUse` matchers (e.g., `Edit|Write`) are now also correctly enforced. Before this version, `postToolUse` matchers were silently dropped, causing formatters and linters to fire after every tool call rather than only after edits. If you relied on `postToolUse` matchers to scope formatting hooks, upgrade to v1.0.63 or later.

**cwd**: Working directory for the command (relative to repository root).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Installing and Using Plugins'
description: 'Learn how to find, install, and manage plugins that extend GitHub Copilot CLI with reusable agents, skills, hooks, and integrations.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-04-27
lastUpdated: 2026-06-23
estimatedReadingTime: '8 minutes'
tags:
- plugins
Expand Down Expand Up @@ -33,9 +33,16 @@ A plugin bundles one or more of the following components:
| **Hooks** | Event handlers that intercept agent behavior | `hooks.json` or `hooks/` |
| **MCP Servers** | Model Context Protocol integrations for external tools | `.mcp.json` or `.github/mcp.json` |
| **LSP Servers** | Language Server Protocol integrations | `lsp.json` or `.github/lsp.json` |
| **Extensions** | Canvas or other session extensions bundled with the plugin | `extensions/` (v1.0.62+) |

A plugin might include all of these or just one — for example, a plugin could provide a single specialized agent, or an entire development toolkit with multiple agents, skills, hooks, and MCP server configurations working together.

### Extensions in Plugins (v1.0.62+)

Starting with v1.0.62, plugins can ship **extensions** — canvas providers or other session extensions that become available immediately when the plugin is installed. This means a plugin can not only provide agents and skills but also add new canvas types or interactive surfaces to your Copilot sessions.

Extensions bundled in plugins are loaded automatically alongside other plugin components — no extra configuration needed beyond installing the plugin.

### Example: What a Plugin Looks Like

Here's the structure of a typical plugin:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Understanding MCP Servers'
description: 'Learn how Model Context Protocol servers extend GitHub Copilot with access to external tools, databases, and APIs.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-05-07
lastUpdated: 2026-06-23
estimatedReadingTime: '8 minutes'
tags:
- mcp
Expand Down Expand Up @@ -66,6 +66,7 @@ MCP servers are configured per-workspace. GitHub Copilot CLI discovers server de
| File | Scope | Notes |
|------|-------|-------|
| `.mcp.json` | Repository root | Preferred for repo-shared configuration |
| `.github/mcp.json` | Repository root (alternate) | Auto-loaded from the `.github/` directory (v1.0.61+) |
| `.vscode/mcp.json` | VS Code workspace | VS Code–compatible workspace config |
| `devcontainer.json` | Dev container | Available when running inside a container |

Expand Down Expand Up @@ -119,6 +120,18 @@ This guided flow is the recommended way to add new MCP servers, especially for s

**type** (remote servers): The transport type for remote MCP servers (`http` or `sse`). This field can now be omitted — the CLI defaults to `http` when no type is specified, simplifying remote server configuration.

**deferTools** (v1.0.63+): When set to `true`, keeps the server's tools always available in the agent's context even when tool search is enabled. By default, tool search can hide infrequently-used tools to reduce context overhead; `deferTools` overrides this and ensures the server's tools are never hidden.

```json
{
"my-always-on-server": {
"command": "npx",
"args": ["-y", "@my-org/mcp-server"],
"deferTools": true
}
}
```

### Managing Persistent MCP Configuration via Server RPCs

In addition to file-based configuration, GitHub Copilot CLI exposes **server RPCs** that let MCP servers and tooling scripts manage the persistent MCP server registry at runtime. This enables programmatic setup — for example, an installer script that registers a server without requiring you to hand-edit a JSON file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Using the Copilot Coding Agent'
description: 'Learn how to use GitHub Copilot coding agent to autonomously work on issues, generate pull requests, and automate development tasks.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-05-13
lastUpdated: 2026-06-23
estimatedReadingTime: '12 minutes'
tags:
- coding-agent
Expand Down Expand Up @@ -138,12 +138,18 @@ Custom agents let you give the coding agent a specialized persona, toolset, and

**Where custom agents live**: Agent profiles are stored as `.agent.md` files in `.github/agents/` in your repository. For organization-wide agents, place them in the root `agents/` directory.

> **Tip (v1.0.62+)**: Custom agents in **nested** `.github/agents/` or `.claude/agents/` directories are automatically discovered when a session is started from a subdirectory of the repository root. This is useful for monorepos where each package or service can have its own tailored agents without polluting the repository-root agents directory.

```
.github/
└── agents/
├── api-architect.agent.md
├── test-specialist.agent.md
└── security-reviewer.agent.md

# Also discovered when starting from packages/backend/:
packages/backend/.github/agents/
└── backend-specialist.agent.md
```

**Selecting an agent on GitHub.com**: When prompting the coding agent or assigning it to an issue, use the dropdown menu in the agents panel to select your custom agent instead of the default.
Expand Down