From f1004d04c0349411f4da03df4d0fa91fb202217c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 09:59:45 +1100 Subject: [PATCH] docs: update Learning Hub for CLI v1.0.10/v1.0.11 features (#1150) - Add monorepo support section to copilot-configuration-basics: customizations discovered at every directory level up to git root - Add personal skills directory (~/.agents/skills/) documentation - Add /clear vs /new session command distinction + /undo command - Add MCP organization policy enforcement to understanding-mcp-servers - Add sessionStart additionalContext injection to automating-with-hooks - Add extension hooks merging behaviour to automating-with-hooks Source: https://github.com/github/copilot-cli/releases/tag/v1.0.11 Source: https://github.com/github/copilot-cli/releases/tag/v1.0.10 Co-authored-by: github-actions[bot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../learning-hub/automating-with-hooks.md | 22 ++++++- .../copilot-configuration-basics.md | 58 ++++++++++++++++++- .../learning-hub/understanding-mcp-servers.md | 11 +++- 3 files changed, 88 insertions(+), 3 deletions(-) diff --git a/website/src/content/docs/learning-hub/automating-with-hooks.md b/website/src/content/docs/learning-hub/automating-with-hooks.md index 6eed0970..7121ee40 100644 --- a/website/src/content/docs/learning-hub/automating-with-hooks.md +++ b/website/src/content/docs/learning-hub/automating-with-hooks.md @@ -3,7 +3,7 @@ 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-03-22 +lastUpdated: 2026-03-24 estimatedReadingTime: '8 minutes' tags: - hooks @@ -99,6 +99,26 @@ Hooks can trigger on several lifecycle events: > **Key insight**: The `preToolUse` hook is the most powerful — it can **approve or deny** individual tool executions. This enables fine-grained security policies like blocking specific shell commands or requiring approval for sensitive file operations. +### sessionStart additionalContext + +The `sessionStart` hook supports an `additionalContext` field in its output. When your hook script writes JSON to stdout containing an `additionalContext` key, that text is **injected directly into the conversation** at the start of the session. This lets hooks dynamically provide environment-specific context—such as the current git branch, deployment environment, or team onboarding notes—without requiring the user to paste it manually. + +Example hook script that surfaces context: + +```bash +#!/usr/bin/env bash +# Output JSON with additionalContext to inject into the session +cat < **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. +### CLI Session Commands + +GitHub Copilot CLI has two commands for managing session state, with distinct behaviours: + +| Command | Behaviour | +|---------|-----------| +| `/new [prompt]` | Starts a fresh conversation while keeping the current session backgrounded. You can switch back to backgrounded sessions. | +| `/clear [prompt]` | Abandons the current session entirely and starts a new one. Backgrounded sessions are not affected. | + +Both commands accept an optional prompt argument to seed the new session with an opening message, for example `/new Add error handling to the login flow`. + +The `/undo` command reverts the last turn—including any file changes the agent made—letting you course-correct without manually undoing edits: + +``` +/undo +``` + +Use `/undo` when the agent's last response went in an unwanted direction and you want to try a different approach from that point. + ## Common Questions **Q: How do I disable Copilot for specific files?** diff --git a/website/src/content/docs/learning-hub/understanding-mcp-servers.md b/website/src/content/docs/learning-hub/understanding-mcp-servers.md index b18066f8..fe9530fb 100644 --- a/website/src/content/docs/learning-hub/understanding-mcp-servers.md +++ b/website/src/content/docs/learning-hub/understanding-mcp-servers.md @@ -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-03-23 +lastUpdated: 2026-03-24 estimatedReadingTime: '8 minutes' tags: - mcp @@ -207,6 +207,15 @@ MCP server SDKs are available in [Python](https://github.com/modelcontextprotoco - **Test server connectivity**: Verify MCP servers start correctly before relying on them in agent workflows. - **Use the MCP allowlist (experimental)**: In high-security environments, the `MCP_ALLOWLIST` feature flag lets you validate MCP servers against a configured registry, blocking unrecognized servers from loading. This is an experimental feature for enterprise environments requiring strict control over which MCP servers are permitted. +### Organization Policy for Third-Party MCP Servers + +GitHub organizations can enforce a policy that restricts which third-party MCP servers members are permitted to use. When this policy is active: + +- Copilot CLI **enforces** the policy for all users in the organization. +- A **warning is shown** if a configured MCP server is blocked by the policy, so you know which servers are restricted before expecting them to work. + +If you see a warning that an MCP server is blocked, contact your organization administrator to find out which servers are on the allowlist, or switch to an approved alternative. + ## Common Questions **Q: Do MCP servers run in the cloud?**