[bot] docs: Update Learning Hub for Copilot CLI v1.0.11/v1.0.12 features#1208
Conversation
Add documentation for new features released in the past 7 days:
- /rewind command and double-Esc timeline picker (v1.0.12)
- /allow-all on/off/show subcommands (v1.0.12)
- .claude/settings.json and .claude/settings.local.json as additional
repo config sources (v1.0.12)
- preCompact hook event in the events table (v1.0.5, previously missing)
- Plugin hooks CLAUDE_PROJECT_DIR and CLAUDE_PLUGIN_DATA env variables
and {{project_dir}}/{{plugin_data_dir}} template variables (v1.0.12)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates Learning Hub documentation to reflect recent GitHub Copilot CLI (v1.0.11/v1.0.12) capabilities, especially around session controls and hooks/plugin behaviors.
Changes:
- Documented the new
/rewindsession timeline picker and updated/allow-allsubcommands/notes. - Added
preCompacthook event and expanded documentation for plugin hook environment/template variables. - Refreshed article metadata (
lastUpdated) for the updated Learning Hub pages.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| website/src/content/docs/learning-hub/copilot-configuration-basics.md | Adds /rewind, clarifies /allow-all subcommands, and documents additional per-repo config sources. |
| website/src/content/docs/learning-hub/automating-with-hooks.md | Adds preCompact and documents plugin hook env/template variables for portable hook scripts. |
| ### Plugin Hooks Environment Variables | ||
|
|
||
| When hooks are defined inside a **plugin**, the hook scripts receive two additional environment variables automatically: | ||
|
|
||
| | Variable | Description | | ||
| |----------|-------------| | ||
| | `CLAUDE_PROJECT_DIR` | The path to the current project (working) directory | | ||
| | `CLAUDE_PLUGIN_DATA` | The path to a persistent data directory scoped to the plugin | | ||
|
|
||
| You can also use these as **template variables** directly in the `bash` or `powershell` fields of your `hooks.json` configuration: | ||
|
|
||
| ```json | ||
| { | ||
| "version": 1, | ||
| "hooks": { | ||
| "sessionStart": [ | ||
| { | ||
| "type": "command", | ||
| "bash": "{{plugin_data_dir}}/scripts/init.sh --project {{project_dir}}", | ||
| "timeoutSec": 10 | ||
| } | ||
| ] | ||
| } | ||
| } |
There was a problem hiding this comment.
This new “Plugin Hooks Environment Variables” section duplicates the existing “Plugin Hook Environment Variables” section later in the same doc (around line ~360) with slightly different wording/examples. Please consolidate into a single section (and keep one heading/name) to avoid the docs diverging over time.
| ### Plugin Hooks Environment Variables | |
| When hooks are defined inside a **plugin**, the hook scripts receive two additional environment variables automatically: | |
| | Variable | Description | | |
| |----------|-------------| | |
| | `CLAUDE_PROJECT_DIR` | The path to the current project (working) directory | | |
| | `CLAUDE_PLUGIN_DATA` | The path to a persistent data directory scoped to the plugin | | |
| You can also use these as **template variables** directly in the `bash` or `powershell` fields of your `hooks.json` configuration: | |
| ```json | |
| { | |
| "version": 1, | |
| "hooks": { | |
| "sessionStart": [ | |
| { | |
| "type": "command", | |
| "bash": "{{plugin_data_dir}}/scripts/init.sh --project {{project_dir}}", | |
| "timeoutSec": 10 | |
| } | |
| ] | |
| } | |
| } |
| 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**: | ||
|
|
There was a problem hiding this comment.
The section intro says Copilot CLI has “two commands” for managing session state (referring to /new and /clear), but this change adds /rewind immediately after. Consider updating the wording and/or the command table so /rewind is discoverable and the section stays internally consistent.
See below for a potential fix:
GitHub Copilot CLI has several 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. |
| `/rewind` | 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. Also available via **double-Esc**. |
| `/undo` | Reverts the last turn—including any file changes the agent made—so you can course-correct without manually undoing edits. |
The `/new` and `/clear` 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`.
| ``` | ||
|
|
||
| Path permissions granted via `/allow-all` persist across `/clear`, so if you've granted access to a directory in one session, that access carries into the new session. | ||
| > **Note**: `/allow-all on` permissions persist after `/clear` starts a new session, so you don't need to re-enable it each time. |
There was a problem hiding this comment.
“/allow-all on permissions persist…” is ambiguous about what persists (autopilot mode itself vs previously granted directory/tool permissions). Please clarify what persists across /clear and what the scope is (e.g., per-session vs per-repo).
| > **Note**: `/allow-all on` permissions persist after `/clear` starts a new session, so you don't need to re-enable it each time. | |
| > **Note**: `/allow-all on` enables autopilot mode for the current terminal session. When you run `/clear`, the new session in that terminal inherits the same allow-all setting (autopilot stays on), but any previously granted directory- or tool-specific confirmations do not carry over. Use `/allow-all off` to disable autopilot for that session. |
What's new
Updates the Learning Hub to document recent GitHub Copilot CLI releases (v1.0.11, March 23 and v1.0.12, March 26, 2026).
New features/changes found
/rewindcommand and double-Esc timeline picker — roll back to any point in conversation history/allow-allnow supportson,off,showsubcommands.claude/settings.jsonand.claude/settings.local.jsonas additional repo config sourcesCLAUDE_PROJECT_DIRandCLAUDE_PLUGIN_DATAenv variables +\{\{project_dir}}/\{\{plugin_data_dir}}template variablespreCompacthook eventPages updated
website/src/content/docs/learning-hub/copilot-configuration-basics.md/rewindcommand description with usage notes (rolls back conversation + file changes to any earlier point; also triggered by double-Esc)/allow-all on/off/showsubcommands to the CLI Session Commands section.claude/settings.jsonand.claude/settings.local.jsonas per-repo config sources (Claude Code compatibility)lastUpdatedto 2026-03-28website/src/content/docs/learning-hub/automating-with-hooks.mdpreCompacthook event to the Hook Events table (fires before context window compaction)CLAUDE_PROJECT_DIR,CLAUDE_PLUGIN_DATA,\{\{project_dir}}, and\{\{plugin_data_dir}}lastUpdatedto 2026-03-28Sources