VS Code extension: renaming a session via the sidebar pencil icon doesn't sync with /rename / cross-session messaging name
Description
In the Claude Code VS Code extension, the sessions sidebar panel lets you rename a session tab via the pencil (✏️) icon. This changes the label shown in the sidebar, but it does not update the session's actual name as seen by ListAgents/SendMessage (cross-session messaging). Conversely, running /rename inside a session's chat updates the cross-session-messaging name, but I could not confirm whether it reliably updates the sidebar label either.
This creates a confusing state: a session can show a custom name in the sidebar (e.g. "My Custom Session Name") while still being addressed by its old auto-generated name (e.g. abc-def-12) in ListAgents. There's no visible indicator in either UI that the two names have diverged.
Steps to reproduce
- Open several sessions as tabs in the VS Code extension's sessions panel.
- Rename one via the pencil icon in the sidebar (e.g. to "My Custom Session Name").
- From another session, run
ListAgents. - Observe the renamed session still listed under its old auto-generated name (e.g.
abc-def-12), not the new sidebar label. - Run
/rename My Custom Session Nameinside that session's chat —ListAgentsnow shows the correct name.
Expected behavior
Renaming a session anywhere (sidebar pencil icon or /rename in chat) should update the same underlying session name, so the sidebar label and the name used for ListAgents/SendMessage always match. At minimum, if these are intentionally two separate name fields, the sidebar should surface the cross-session-messaging name too (or flag when they differ), so it's clear which name to use when addressing that session from another one.
Actual behavior
The sidebar pencil-icon rename and the /rename chat command appear to update two different, unsynced name fields, with no indication in the UI that they've diverged.
Environment
- Claude Code CLI/extension version: 2.1.241
- Host: VS Code extension
- OS: macOS (Darwin 23.6.0)