Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Building Custom Agents'
description: 'Learn how to create specialized GitHub Copilot agents with custom personas, tool integrations, and domain expertise.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-06-25
lastUpdated: 2026-06-26
estimatedReadingTime: '10 minutes'
tags:
- agents
Expand Down Expand Up @@ -73,6 +73,18 @@ tools: ['codebase', 'terminal', 'github']

**model** (recommended): The AI model that powers the agent. Choose based on the complexity of the task—use more capable models for nuanced reasoning.

**reasoningEffort** *(v1.0.66+)*: Override the reasoning effort level for this agent. Accepted values are `low`, `medium`, and `high`. This lets you pin specific agents to a cost/quality tradeoff regardless of the user's global setting — for example, a quick code-formatting agent can use `low` effort, while a security reviewer uses `high`:

```yaml
---
name: 'Security Reviewer'
description: 'Thorough security audit for OWASP vulnerabilities'
model: Claude Sonnet 4
reasoningEffort: high
tools: ['codebase', 'terminal', 'github']
---
```

**tools** (recommended): An array of built-in tools and MCP servers the agent can access. Common tools include:

| Tool | Purpose |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Copilot Configuration Basics'
description: 'Learn how to configure GitHub Copilot at user, workspace, and repository levels to optimize your AI-assisted development experience.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-06-25
lastUpdated: 2026-06-26
estimatedReadingTime: '10 minutes'
tags:
- configuration
Expand Down Expand Up @@ -248,6 +248,14 @@ See [references/test-patterns.md](references/test-patterns.md) for standard patt

Skills can also bundle reference files, templates, and scripts in their folder, giving the AI richer context than a single file can provide. Unlike the older prompt format, skills can be discovered and invoked by agents automatically.

**Dynamic skill retrieval** (v1.0.66+): By default, Copilot CLI uses embeddings-based retrieval to automatically surface the most relevant skills for each prompt. You can toggle this behavior with the `--dynamic-retrieval` flag or the `dynamicRetrieval` config setting. To disable embeddings-based retrieval (for example, to force all configured skills to always be loaded):

```bash
copilot --dynamic-retrieval skills=off
```

This setting persists across sessions once saved to your config.

**When to use**: For repetitive tasks your team performs regularly, like generating tests, creating documentation, or refactoring patterns.

### Instructions Files
Expand Down Expand Up @@ -392,6 +400,7 @@ CLI settings use **camelCase** naming. Key settings added in recent releases:
| `include_gitignored` | Include gitignored files in `@` file search |
| `extension_mode` | Control extensibility (agent tools and plugins) |
| `continueOnAutoMode` | Automatically switch to the auto model on rate limit instead of pausing |
| `proxy` | HTTP(S) proxy URL for all outbound requests (v1.0.64+) |

> **Note**: Older snake_case names (e.g., `include_gitignored`, `auto_updates_channel`) are still accepted for backward compatibility, but camelCase is now the preferred format.

Expand Down Expand Up @@ -485,7 +494,7 @@ The `/fork` command (v1.0.45+) copies the current session into a **new independe

After forking, the new session is immediately active. Both sessions share the same history up to the fork point but accumulate changes independently from that moment forward. Use `/fork` to experiment with a risky refactor without abandoning your current working session. Since v1.0.47, forked sessions display their **origin session** name in the sessions dialog, making it easy to trace which session a fork came from.

The `/cd` command changes the working directory for the current session. Each session maintains its own working directory that persists when you switch between sessions:
The `/cd` command changes the working directory for the current session. Since v1.0.65, the working directory **persists when you resume a session** — if you restart the CLI and resume, you return to the same directory automatically. Changing directory also triggers discovery of custom agents in the new location, so switching to a different project loads its agents without a restart:

```
/cd ~/projects/my-other-repo
Expand All @@ -499,8 +508,27 @@ The `/worktree` command (v1.0.61+, also aliased `/move`) creates a new git workt
/worktree my-feature-branch
```

In v1.0.66+, you can pass a task description to `/worktree` to name the branch from the task and immediately run the task as the first prompt in the new worktree — all in one step:

```
/worktree fix the login redirect
```

This creates a branch named from your task description and begins working on it immediately, making it easy to spin up parallel work without stopping to think of a branch name.

After the command runs, the session is inside the new worktree. Use this when you want to work on a second task in parallel without stashing changes or opening a new terminal. In v1.0.64+ you can also use the experimental `--worktree` flag at startup (`copilot -w [name]`) to create or reuse a worktree under `<repo>.worktrees/` before the session begins.

The `/every` command (also available as `/loop` since v1.0.64) schedules a recurring prompt to run automatically at a specified interval. This is useful for self-paced automation — running a check every few minutes, polling for results, or periodically summarising progress during a long session:

```
/every 5m Check if there are any new test failures and summarize them
/loop 30s Check if the build is done
```

The interval can be specified in seconds (`s`), minutes (`m`), or hours (`h`). To see and manage all your scheduled prompts, use `/every` with no argument — it opens the schedule manager. To cancel a running schedule, use `/every stop` or press the stop option in the schedule manager.

> **Note**: Scheduled prompts run in the background of the current session and use your active model. They share the session context window, so very frequent scheduling with long responses may consume context rapidly. Use `/compact` if context usage becomes a concern.

The `/share html` command exports the current session — including conversation history and any research reports — as a **self-contained interactive HTML file**:

```
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-06-24
lastUpdated: 2026-06-26
estimatedReadingTime: '8 minutes'
tags:
- mcp
Expand Down Expand Up @@ -285,6 +285,8 @@ For example, a PostgreSQL server that can't connect because `DATABASE_URL` is no
/mcp show postgres # inspect a specific server
```

**Toggling servers on and off** (v1.0.66+): From the `/mcp` list view, you can **enable or disable individual MCP servers** without editing your config file. Select a server in the list and toggle it — disabled servers won't start in future sessions and their tools won't be available to agents. This is useful for temporarily disabling a server that's causing slowdowns or errors without removing it from your configuration entirely.

**Common causes and fixes**:

| Symptom | Likely Cause | Fix |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Working with Canvas Extensions'
description: 'Create and iterate on GitHub Copilot app canvases using /create-canvas, then shape them into reusable project or personal extensions.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-06-17
lastUpdated: 2026-06-26
estimatedReadingTime: '8 minutes'
tags:
- copilot-app
Expand Down Expand Up @@ -133,6 +133,12 @@ Treat the first `/create-canvas` result as version one. Then refine in-place:

The fastest loop is: **use the canvas**, note friction, and ask the agent for a targeted update.

## Canvas persistence across restarts

Since v1.0.65, open canvases are **automatically resumed when you restart Copilot CLI**. If a session with an active canvas was running when you exited, the canvas reopens in the right panel the next time you resume that session — no need to manually re-open or recreate it.

This means long-running canvas workflows (like a multi-day planning board or a persistent triage surface) survive CLI restarts without losing state. Canvas content is preserved in extension-scoped storage as long as the extension is still loaded.

## Next steps

- Review the [GitHub Copilot app overview](../github-copilot-app/) for broader session and workflow concepts.
Expand Down