Update Learning Hub with April 2026 Copilot CLI changes (v1.0.25–v1.0.32)

- copilot-configuration-basics.md: add auto model selection, /statusline,
  /env, /remote, --connect, short session ID resume, sessionIdleTimeout setting
- understanding-mcp-servers.md: add MCP registry install (/mcp install),
  type field default, COPILOT_AGENT_SESSION_ID env var
- understanding-copilot-context.md: add document file attachment section

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-04-18 19:37:07 +00:00
committed by GitHub
parent dddab5e459
commit 04567d1f3a
3 changed files with 65 additions and 4 deletions

View File

@@ -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.' description: 'Learn how to configure GitHub Copilot at user, workspace, and repository levels to optimize your AI-assisted development experience.'
authors: authors:
- GitHub Copilot Learning Hub Team - GitHub Copilot Learning Hub Team
lastUpdated: 2026-04-02 lastUpdated: 2026-04-18
estimatedReadingTime: '10 minutes' estimatedReadingTime: '10 minutes'
tags: tags:
- configuration - configuration
@@ -391,6 +391,7 @@ CLI settings use **camelCase** naming. Key settings added in recent releases:
| `statusLine` | Show status line in the terminal UI | | `statusLine` | Show status line in the terminal UI |
| `include_gitignored` | Include gitignored files in `@` file search | | `include_gitignored` | Include gitignored files in `@` file search |
| `extension_mode` | Control extensibility (agent tools and plugins) | | `extension_mode` | Control extensibility (agent tools and plugins) |
| `sessionIdleTimeout` | Duration of inactivity before a session is automatically closed (disabled by default; configure via `--session-idle-timeout` flag) |
> **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. > **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.
@@ -405,6 +406,8 @@ These files follow the same format as `config.json` and are loaded after the glo
The model picker opens in a **full-screen view** with inline reasoning effort adjustment. Use the **← / →** arrow keys to change the reasoning effort level (`low`, `medium`, `high`) directly from the picker without leaving the session. The current reasoning effort level is also displayed in the model header (e.g., `claude-sonnet-4.6 (high)`) so you always know which level is active. The model picker opens in a **full-screen view** with inline reasoning effort adjustment. Use the **← / →** arrow keys to change the reasoning effort level (`low`, `medium`, `high`) directly from the picker without leaving the session. The current reasoning effort level is also displayed in the model header (e.g., `claude-sonnet-4.6 (high)`) so you always know which level is active.
Select **`auto`** as your model to let Copilot automatically pick the best available model for each session. This is useful when you want Copilot to adapt its model choice based on the task at hand without manually switching.
### CLI Session Commands ### CLI Session Commands
GitHub Copilot CLI has two commands for managing session state, with distinct behaviours: GitHub Copilot CLI has two commands for managing session state, with distinct behaviours:
@@ -449,6 +452,38 @@ The `/cd` command changes the working directory for the current session. Each se
This is useful when you have multiple backgrounded sessions each focused on a different project directory. This is useful when you have multiple backgrounded sessions each focused on a different project directory.
The `/statusline` command (with `/footer` as an alias) lets you customize which items appear in the status bar at the bottom of the terminal:
```
/statusline # show current status bar configuration
/statusline directory branch # show only directory and branch
/statusline effort context quota # show effort level, context window, and quota
```
Available items: `directory`, `branch`, `effort`, `context`, `quota`. This lets you tailor the status bar to show only the information you need.
The `/env` command displays a summary of all currently loaded environment details — instructions, MCP servers, skills, agents, and plugins — making it easy to verify your configuration is loaded correctly, especially in CI pipelines:
```
/env
```
This is particularly useful when debugging why an agent, skill, or MCP server is not behaving as expected.
The `/remote` command (or `--remote` flag) lets you remote-control your CLI sessions from another terminal or process:
```
/remote # show current session ID for remote control
gh copilot --remote <session-id> # attach to an existing remote session
gh copilot --connect <session-id> # directly connect to a remote session by ID
```
You can also use short session ID prefixes (at least 7 hex characters) with `--resume` and `/resume` instead of the full session ID:
```
/resume abc1234 # resume a session using just the first 7 chars of its ID
```
The `/share html` command exports the current session — including conversation history and any research reports — as a **self-contained interactive HTML file**: The `/share html` command exports the current session — including conversation history and any research reports — as a **self-contained interactive HTML file**:
``` ```

View File

@@ -3,7 +3,7 @@ title: 'Understanding Copilot Context'
description: 'Learn how GitHub Copilot uses context from your code, workspace, and conversation to generate relevant suggestions.' description: 'Learn how GitHub Copilot uses context from your code, workspace, and conversation to generate relevant suggestions.'
authors: authors:
- GitHub Copilot Learning Hub Team - GitHub Copilot Learning Hub Team
lastUpdated: 2025-11-28 lastUpdated: 2026-04-18
estimatedReadingTime: '8 minutes' estimatedReadingTime: '8 minutes'
tags: tags:
- context - context
@@ -124,6 +124,14 @@ GitHub Copilot has a maximum token limit for how much context it can process at
Understanding this prioritization helps you optimize which files to keep open and when to use explicit references. Understanding this prioritization helps you optimize which files to keep open and when to use explicit references.
### Attaching Document Files
In GitHub Copilot CLI, you can attach supported document files directly to a prompt for the agent to read and reason about. This is useful for feeding in external context that isn't already in your codebase — for example, API specs, architecture documents, PDFs, or requirements files.
Supported file types include common document formats (PDF, DOCX, etc.) as well as text-based files. When you attach a file, its contents are included in the agent's context for that turn, allowing it to reason about the document alongside your code.
This capability is especially valuable when you want to implement a feature from a spec, review code against a design document, or ask questions about an external reference without manually copying and pasting content.
## Context Best Practices ## Context Best Practices
Maximize GitHub Copilot's effectiveness by providing clear, relevant context: Maximize GitHub Copilot's effectiveness by providing clear, relevant context:

View File

@@ -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.' description: 'Learn how Model Context Protocol servers extend GitHub Copilot with access to external tools, databases, and APIs.'
authors: authors:
- GitHub Copilot Learning Hub Team - GitHub Copilot Learning Hub Team
lastUpdated: 2026-04-01 lastUpdated: 2026-04-18
estimatedReadingTime: '8 minutes' estimatedReadingTime: '8 minutes'
tags: tags:
- mcp - mcp
@@ -97,8 +97,12 @@ Example `.mcp.json` or `.vscode/mcp.json`:
**args**: Arguments passed to the command. Most MCP servers are distributed as npm packages and can be run with `npx -y`. **args**: Arguments passed to the command. Most MCP servers are distributed as npm packages and can be run with `npx -y`.
**type**: The transport type (`stdio`, `http`, or `sse`). For remote HTTP-based MCP servers, the `type` field can be omitted — it defaults to `http`.
**env**: Environment variables passed to the server process. Use these for connection strings, API keys, and configuration—never hardcode secrets in the JSON file. **env**: Environment variables passed to the server process. Use these for connection strings, API keys, and configuration—never hardcode secrets in the JSON file.
> **Tip**: Shell commands and MCP servers automatically receive `COPILOT_AGENT_SESSION_ID` as an environment variable. You can use this to correlate MCP server logs, tool calls, and shell command output back to the specific Copilot session that triggered them.
### Managing Persistent MCP Configuration via Server RPCs ### 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. 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.
@@ -220,7 +224,21 @@ This enables sophisticated patterns like MCP servers that orchestrate multi-step
> **Note**: Sampling requires explicit user approval every time a server requests inference. This is a security boundary — MCP servers cannot silently consume your AI quota or exfiltrate context without your knowledge. > **Note**: Sampling requires explicit user approval every time a server requests inference. This is a security boundary — MCP servers cannot silently consume your AI quota or exfiltrate context without your knowledge.
## Finding MCP Servers ## Finding and Installing MCP Servers
### Installing from the Registry
The easiest way to add an MCP server is directly from the CLI registry. GitHub Copilot CLI can guide you through the configuration interactively:
```
/mcp install
```
This opens a guided flow where you can browse available servers, select one, and Copilot walks you through any required configuration (such as connection strings or API keys). The server is registered persistently so it's available in all future sessions.
This is the recommended approach for common servers — no manual JSON editing required.
### Browsing Available Servers
The MCP ecosystem is growing rapidly. Here are key resources: The MCP ecosystem is growing rapidly. Here are key resources: