docs: update Learning Hub with CLI v1.0.35-v1.0.36 changes

- automating-with-hooks: add HTTP hook type ("type": "http"), document
  preToolUse.matcher behavior fix in v1.0.36
- copilot-configuration-basics: update CLI settings file path to
  ~/.copilot/settings.json, add continueOnAutoMode setting, document
  COPILOT_GH_HOST env var, add session naming (--name/--resume=<name>),
  /session delete subcommands, /keep-alive without experimental mode,
  and note that ~/.claude/ is no longer loaded by Copilot CLI
- using-copilot-coding-agent: update /remote section with /remote on,
  /remote off, and /remote status subcommands

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-04-24 19:42:14 +00:00
committed by GitHub
parent 0e422e6dff
commit 50ae82ec6e
3 changed files with 87 additions and 6 deletions

View File

@@ -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-04-16
lastUpdated: 2026-04-24
estimatedReadingTime: '8 minutes'
tags:
- hooks
@@ -171,7 +171,7 @@ Each hook entry supports these fields:
}
```
**type**: Always `"command"` for shell-based hooks.
**type**: `"command"` for shell-based hooks, or `"http"` for HTTP hooks (see below).
**bash**: The command or script to execute on Unix systems. Can be inline or reference a script file.
@@ -183,6 +183,42 @@ Each hook entry supports these fields:
**env**: Additional environment variables merged with the existing environment.
### HTTP Hooks
In addition to shell commands, hooks support an `"http"` type that POST a JSON payload to any URL. This lets you integrate Copilot lifecycle events directly with webhooks, internal services, and monitoring systems — without writing a shell script:
```json
{
"version": 1,
"hooks": {
"sessionStart": [
{
"type": "http",
"url": "https://hooks.example.com/copilot/session-started",
"timeoutSec": 5
}
],
"agentStop": [
{
"type": "http",
"url": "https://hooks.example.com/copilot/agent-stopped",
"timeoutSec": 5
}
]
}
}
```
The event context (the same JSON that would be passed as stdin to a shell hook) is sent as the POST body. The hook is considered successful when the server responds with a 2xx status code.
HTTP hooks are ideal for:
- Sending audit events to a central logging endpoint
- Triggering CI/CD pipelines when the coding agent finishes
- Posting session notifications to Slack or Teams via their incoming webhooks
- Integrating with enterprise governance systems that expose webhook endpoints
> **Tip**: For sending Slack/Teams notifications, prefer HTTP hooks over `curl` in a shell hook — they're simpler to configure and work on all platforms without requiring curl to be installed.
### README.md
The README provides metadata and documentation for the Awesome Copilot repository. While not required in your own implementation, it serves as a useful way to document them for your team.
@@ -332,6 +368,8 @@ Block dangerous commands before they execute:
The `preToolUse` hook receives JSON input with details about the tool being called. Your script can inspect this input and exit with a non-zero code to **deny** the tool execution, or exit with zero to **approve** it.
> **Important (v1.0.36 behavior change)**: If your `preToolUse` hook uses the `matcher` field to filter by tool name, note that `matcher` is now applied correctly as a full-regex match against the tool name. Previously, `matcher` was silently ignored, so all tool calls triggered the hook. After upgrading to v1.0.36, a hook with `matcher: "^Bash$"` will only fire for the `Bash` tool — not for every tool. Review existing hooks with `matcher` to confirm they still fire for the tools you intend.
### Modifying Tool Arguments with preToolUse
Beyond approve/deny, `preToolUse` hooks can also **modify tool arguments** before they are passed to the tool, and inject **additional context** into the agent's reasoning. To do this, write JSON to stdout from your hook script:

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.'
authors:
- GitHub Copilot Learning Hub Team
lastUpdated: 2026-04-16
lastUpdated: 2026-04-24
estimatedReadingTime: '10 minutes'
tags:
- configuration
@@ -372,7 +372,9 @@ Settings: File → Settings → Tools → GitHub Copilot
### GitHub Copilot CLI
Configuration file: `~/.copilot-cli/config.json`
Configuration file: `~/.copilot/settings.json`
> **Note**: In v1.0.35, user settings were moved to `~/.copilot/settings.json` (separate from internal state, which remains in `config.json`). If you were previously editing `~/.copilot-cli/config.json`, the new location is `~/.copilot/settings.json`.
```json
{
@@ -391,6 +393,7 @@ CLI settings use **camelCase** naming. Key settings added in recent releases:
| `statusLine` | Show status line in the terminal UI |
| `include_gitignored` | Include gitignored files in `@` file search |
| `extension_mode` | Control extensibility (agent tools and plugins) |
| `continueOnAutoMode` | Automatically switch to auto model on rate limit instead of pausing |
> **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.
@@ -401,6 +404,14 @@ In addition to the main config file, GitHub Copilot CLI reads two optional per-p
These files follow the same format as `config.json` and are loaded after the global config, so they can tailor CLI behaviour—including hook definitions—per repository without touching `.github/`.
> **Note (v1.0.36)**: Custom agents, skills, and commands from `~/.claude/` are **no longer loaded** by Copilot CLI. If you previously stored personal agents or skills in `~/.claude/agents/` or `~/.claude/skills/`, move them to `~/.agents/` (personal agents directory) or the appropriate `~/.copilot/` location. Only Copilot-specific directories are loaded.
### Environment Variables
| Variable | Description |
|----------|-------------|
| `COPILOT_GH_HOST` | Override the GitHub hostname for authentication and API calls. Takes precedence over `GH_HOST`. Useful when working with GitHub Enterprise Server. |
### Model Picker
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.
@@ -416,6 +427,18 @@ GitHub Copilot CLI has two commands for managing session state, with distinct be
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`.
### Naming and Managing Sessions
You can name sessions at startup and resume them by name:
```bash
copilot --name "auth-refactor" # start a session with a specific name
copilot --resume "auth-refactor" # resume a session by name
copilot --resume # open the interactive session picker
```
The session picker shows branch names and idle/in-use status, and supports improved search with cursor support. Use `--continue` to resume the most recent session from the **current working directory** (preferred over the globally most-recently-used session since v1.0.35).
The `/session rename` command renames the current session. When called **without a name argument**, it automatically generates a session name based on the conversation history:
```
@@ -423,6 +446,16 @@ The `/session rename` command renames the current session. When called **without
/session rename "My feature" # set a specific name
```
You can also delete sessions you no longer need:
```
/session delete # delete the current session
/session delete <id> # delete a specific session by ID
/session delete-all # delete all sessions
```
In the session picker, press **x** to delete the highlighted session without leaving the picker.
Auto-generated names help you find sessions quickly when switching between multiple backgrounded sessions.
The `/rewind` command opens a timeline picker that lets you roll back the conversation to any earlier point in history, reverting both the conversation and any file changes made after that point. You can also trigger it by pressing **double-Esc**:
@@ -507,6 +540,12 @@ copilot --plan # start in plan mode (propose without executing)
This is useful in scripts or CI pipelines where you want the CLI to immediately begin working in a specific mode without an interactive prompt.
The `/keep-alive` command prevents your system from sleeping while Copilot CLI is active. This is useful for long-running agent tasks. As of v1.0.36, `/keep-alive` is available in all sessions — no experimental mode required:
```
/keep-alive # prevent system sleep during the session
```
## Common Questions
**Q: How do I disable Copilot for specific files?**

View File

@@ -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-04-16
lastUpdated: 2026-04-24
estimatedReadingTime: '12 minutes'
tags:
- coding-agent
@@ -349,9 +349,13 @@ copilot --remote
Or open a remote control tab from inside an existing session:
```
/remote
/remote # show current remote control status
/remote on # enable remote control (register this session with GitHub)
/remote off # disable remote control
```
Running `/remote` without arguments shows whether remote control is currently active. Use `/remote on` to register the session for remote access, and `/remote off` to disconnect.
The **Remote** tab in the CLI shows all active coding agent tasks from the repository. Select a task to connect and begin sending steering messages.
### Resuming from the Session Picker