Adopt copilot/sdk session-title APIs and sync title across session list, editor, CLI #312038
Merged
anthonykim1 merged 10 commits intomainfrom Apr 23, 2026
Merged
Adopt copilot/sdk session-title APIs and sync title across session list, editor, CLI #312038anthonykim1 merged 10 commits intomainfrom
anthonykim1 merged 10 commits intomainfrom
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Contributor
Screenshot ChangesBase: Changed (24) |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adopts the @github/copilot/sdk session title APIs as the source of truth for Copilot CLI session titles, and ensures title changes propagate across the VS Code sessions list, the chat editor tab/header, and terminal resume flows.
Changes:
- Propagate session-item label changes to the active chat model so editor/header titles stay in sync.
- Switch Copilot CLI session title retrieval/updates to SDK-backed metadata (
name/summary) and add SDK summary update support. - Update Copilot CLI session service logic, mocks, and tests to validate rename/summary/title synchronization.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/api/browser/mainThreadChatSessions.ts | Syncs contributed session item label changes into the live chat model title. |
| extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts | After generating a title, updates the SDK session summary so CLI/VS Code surfaces stay consistent. |
| extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts | Stages generated titles for brand-new sessions and uses SDK getSessionTitle when building list items. |
| extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/customSessionTitleServiceImpl.ts | Makes title generation return a value without persisting it, leaving persistence to callers. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/test/testHelpers.ts | Extends SDK session mocks with name and title update methods + metadata support. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliSessionService.spec.ts | Adds tests for rename/summary updates and staged-title sync into the SDK. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSessionService.ts | Implements SDK-backed title querying + writable-session operations for rename/summary updates and staged-title syncing on session creation. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 3
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
roblourens
previously approved these changes
Apr 23, 2026
rebornix
previously approved these changes
Apr 23, 2026
Co-authored-by: Copilot <copilot@github.com>
TylerLeonhardt
approved these changes
Apr 23, 2026
anthonykim1
commented
Apr 27, 2026
| return existing; | ||
| } | ||
|
|
||
| // Propagate a renamed item label to the open chat model so the chat editor tab |
Contributor
Author
There was a problem hiding this comment.
agentsPending.mov
Maybe what's causing the temporary title change? @roblourens @DonJayamanne
This is meant to ensure title is synced across session list, chat editor header though.
Edit: Addressed issue where pending title would flicker in agents app in #312657
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #311535
Renaming a Copilot CLI session title from VS Code now sticks everywhere it
should — sessions list, chat editor tab/header, and
copilot --resumeinthe terminal.
Adopts the copilot/sdk session-title APIs so the SDK is the source of truth
instead of a local label cache.
Side fix after some surprise 😮:
Noticed the chat panel/header was not syncing on rename even when
the sessions list was. The two surfaces share no state:
ChatSessionItem.labelfrom the contributeditem provider.
which only updates when something fires
setCustomTitleon the model.This PR would bridge the gap there as well. -> In
mainThreadChatSessionsso a label change on alive session propagates into the chat model.
AFTER PR:

How titles flow:
namefield.summaryfield.copilot --resumerenames write tonametoo, and VS Code picks them up the next time it reads metadata.How a title is picked, in order:
name, or legacy custom title).summaryfrom metadata (skipped if it looks truncated — ends with...or contains<).summaryas a last resort, just for display — not cached.A couple of things worth calling out:
renameSessionandupdateSessionSummaryclear the cached derived label, so a brand-new title is never hidden behind an old cached one./cc @DonJayamanne