Skip to content
Merged
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
3 changes: 2 additions & 1 deletion docs/agent-native/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"area": "agents/sessions",
"topics": [
["Manage Sessions", "/docs/agents/sessions/chat-sessions"],
["Session Insights", "/docs/agents/sessions/session-insights"]
["Session Insights", "/docs/agents/sessions/session-insights"],
["Sync Sessions", "/docs/agents/sessions/session-sync"]
]
}],

Expand Down
2 changes: 2 additions & 0 deletions docs/agents/reference/copilot-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ The team is continuously working on improving Copilot in VS Code and adding new
| `setting(chat.utilitySmallModel)`<br/>Override the language model used for fast, lightweight [utility flows](/docs/agent-customization/language-models.md#change-the-model-for-utility-tasks), such as commit messages, rename suggestions, and intent detection. A fast, inexpensive model is recommended. | `"Default"` |
| `setting(github.copilot.chat.edits.suggestRelatedFilesFromGitHistory)` _(Experimental)_<br/>Suggest related files from git history in chat context. | `true` |
| `setting(github.copilot.chat.localIndex.enabled)`<br/>Enable local session tracking for [session insights](/docs/agents/sessions/session-insights.md) and `/chronicle` commands. | `true` |
| `setting(chat.sessionSync.enabled)`<br/>Enable [session sync](/docs/agents/sessions/session-sync.md) to GitHub.com. When enabled, Copilot session data syncs to your GitHub account for cross-device access. Requires `setting(github.copilot.chat.localIndex.enabled)` to also be enabled. | `true` |
| `setting(chat.sessionSync.excludeRepositories)`<br/>Repository patterns to exclude from [session sync](/docs/agents/sessions/session-sync.md). Use exact `owner/repo` names or glob patterns like `my-org/*`. Sessions from matching repositories are stored locally only. | `[]` |

## Agent settings

Expand Down
12 changes: 7 additions & 5 deletions docs/agents/sessions/session-insights.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MetaSocialImage: ../../images/shared/github-copilot-social.png
---
# Query session history with chronicle

Your GitHub Copilot sessions build a searchable history of everything you work on. Ask natural language questions about past sessions, generate standup reports, get personalized tips, and search your coding history.
Your GitHub Copilot sessions build a searchable history of everything you work on. Ask natural language questions about past sessions, generate standup reports, get personalized tips, and search your coding history. With [session sync](/docs/copilot/chat/session-sync.md) active by default, queries draw from sessions across Copilot CLI, coding agent, code review, and VS Code.

## Chronicle commands

Expand All @@ -18,11 +18,11 @@ Use these commands in the chat input to query your session history:
| `/chronicle:tips` | Analyze your recent session history (typically 7 days) and suggest ways to use Copilot more effectively. Tips are grounded in your actual usage patterns: tools you rarely use, prompting patterns that lead to better results, or workflow improvements. |
| `/chronicle:cost-tips` | Analyze recent sessions to identify opportunities to reduce token usage and Copilot cost. |
| `/chronicle:search <query>` | Search sessions by keyword, file path, or PR or issue reference. Uses full-text indexing across session summaries, conversation turns, file paths, and checkpoint notes. Results include session IDs and timestamps so you can resume relevant sessions. |
| `/chronicle:reindex` | Rebuild the local session index. |
| `/chronicle:reindex` | Rebuild the local session index and sync session data to your account. |

## Free-form questions

You can also ask free-form questions about your session history directly in chat. For example, type "What files did I edit yesterday?" or "Have I worked on anything related to the payments API?" and Copilot searches your local session history to answer. Unlike `/chronicle:search` which performs a direct content search, free-form questions use semantic understanding to find relevant sessions.
You can also ask free-form questions about your session history directly in chat. For example, type "What files did I edit yesterday?" or "Have I worked on anything related to the payments API?" and Copilot searches your synced session history to answer. Unlike `/chronicle:search` which performs a direct content search, free-form questions use semantic understanding to find relevant sessions.

## What gets tracked

Expand All @@ -33,11 +33,11 @@ For each chat session, the local session store records:
* **Files touched**: file paths from tool calls such as `replace_string_in_file`, `create_file`, `read_file`, and `apply_patch`.
* **External references**: PR numbers, issue numbers, and commit SHAs extracted from GitHub MCP tool calls and terminal commands.

Data is stored in a local SQLite database.
Data is stored in a local SQLite database. Secrets such as tokens, API keys, passwords, and connection strings are automatically filtered before data is synced to the cloud.

## Reindex the session store

If sessions appear missing or the database becomes corrupted, rebuild the index.
If sessions appear missing or the database becomes corrupted, rebuild the index. Reindexing also syncs your session data to your account.

```prompt
/chronicle:reindex
Expand All @@ -50,8 +50,10 @@ Situations where reindexing helps:
* After restoring session files from a backup
* After an unexpected crash that prevented data from flushing to the store
* After manually deleting session directories
* After opting back into session sync

## Related content

* [Session sync](/docs/agents/sessions/session-sync.md) - Sync sessions to your GitHub account for cross-device access
* [Manage chat sessions](/docs/agents/sessions/chat-sessions.md) - Create and organize chat sessions
* [Settings reference](/docs/agents/reference/copilot-settings.md) - All Copilot settings
6 changes: 3 additions & 3 deletions docs/agents/sessions/session-sync.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
ContentId: b4e8c9f3-6d5a-4b2e-c7a4-8f9e1b3d2c5a
DateApproved: 6/3/2026
MetaDescription: Sync your GitHub Copilot chat sessions to your GitHub account to access session insights, share sessions, and query across all your sessions from any device.
DateApproved:
MetaDescription: Sync your Copilot chat sessions to GitHub for cross-device access, enterprise policy controls, and sharing with teammates.
MetaSocialImage: ../images/shared/github-copilot-social.png
---
# Sync Copilot sessions to GitHub

By default, VS Code syncs your GitHub Copilot chat sessions to your GitHub account, including all local agent sessions. Synced sessions are private to you and are not visible to anyone else unless you explicitly share them. They appear on GitHub.com in the **Agents** tab of your repository, enabling [session insights](/docs/agents/sessions/session-insights.md) to query across all your sessions, including those from Copilot CLI, coding agent, code review, and the GitHub Copilot Desktop app.
By default, VS Code syncs your chat sessions to your GitHub account, including all local agent sessions. Synced sessions are private to you and are not visible to anyone else unless you explicitly share them. They appear on GitHub.com in the **Agents** tab of your repository, enabling [session insights](/docs/agents/sessions/session-insights.md) to query across all your sessions, including those from Copilot CLI, coding agent, code review, and the GitHub Copilot Desktop app.

## Opt out of session sync

Expand Down
2 changes: 1 addition & 1 deletion docs/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@
"toc": "extension-docs/toc.json",
"topics": []
},
]
]