chat: fix cloud session titles in editor window #343331

Merged
roblourens opened 3:21pm on October 21, 2026 wanted to merge 207 Ξ” into microsoft/vscode main from
roblou/agents/fix-editor-window-title-issue
Diff Delta:
207
About 50 Diff Delta/hour
Classified as:  Bug Fix

roblourens' Description of Work

Cloud sessions can retain a default-chat title such as main after the host updates the session title. The editor window preferred that chat title, hiding the correct session title.

Use the session title consistently for cloud session list rows, live conversations, and recorded history, matching the Agents window. Route default-session renames to the session channel. Keep independent local default-chat titles and peer-chat titles unchanged.

How to test


  1. Create a Cloud session from the editor window and complete a turn.

  2. Confirm the session list, chat header, and editor tab use the session title rather than the default chat's branch-name title.

  3. Open the same session in the Agents window and confirm the title agrees.

  4. Rename the session from the editor and confirm both windows update.

Exercised this flow against a real cloud session with the fixed Code OSS build on macOS. The host's default chat stayed titled main, while both windows displayed the session title. A manual rename updated both windows and persisted on reconnect.

Two limits observed during live testing: the host retained the initial prompt label rather than generating a short title, and cold discovery after reload briefly shows the older task name until opening the session reconnects to the host. This PR fixes the default-chat/session-title selection mismatch, not task-name synchronization.

(Written by Copilot)

11 total changed files
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
You are now leaving the Pull Request Diff Zone
No more diffs beyond this point