[FEATURE] VS Code extension: show and copy the session id (stable) beside the cross-session name (per-process) in the chat panel

Status Open
Reported on v2.1.263
Maintainer reply None cached
Activity 1 comment · opened Sep 10, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet — nearest: #90084 asks to show the short cross-session name and to mention sessions by it; #86736 covers the rename not propagating to the registry. This request is for the stable session id to be visible and copyable in the VS Code extension.
  • [x] This is a single feature request (not multiple features)

Problem Statement

Two Claude Code sessions in two VS Code windows on one machine coordinate through the cross-session tools (ListAgents / SendMessage). The address ListAgents prints is <workspace>-<hash>, minted per process: it changes on every Developer: Reload Window. The session id (CLAUDE_CODE_SESSION_ID, the value --resume takes) is stable across reloads and resumes. Measured on 2026-09-10 (CLI 2.1.263, VS Code extension, WSL 2 on Windows 11): one session wore four names in one afternoon and the other five, while both ids never changed.

There is no way to see or copy that id from the chat panel. To know which panel is which session, we read ~/.claude/sessions/<pid>.json by hand (pid · sessionId · name · cwd · messagingSocketPath) and resolve the current name from the id after every reload. The stable thing is invisible; the visible thing is unstable.

Proposed Solution

Show the session id — and the current cross-session name beside it — in the chat panel (header or session info) with a copy action, plus a command palette entry such as Claude Code: Copy Session ID. Once #86736 lands, the user's label would sit beside them.

Alternative Solutions

  • Reading the registry by hand (~/.claude/sessions/<pid>.json) and resolving the live name from the id after each reload — works, but it is archaeology a user should not need.
  • Renaming the sessions in Session history — measured 2026-09-10: both sessions renamed and reloaded, ListAgents still prints <workspace>-<hash> (that is #86736).
  • #90084's proposal shows the short name; that name is the per-process value, which is exactly what changes.

Priority

Medium - Would be very helpful

Feature Category

Other (VS Code extension)

Use Case Example

  1. Session A in repo X and session B in repo Y, each in its own VS Code window, exchange notes on disk and ring each other with SendMessage.
  2. The user runs Developer: Reload Window; both names change; B's stored address for A is now stale.
  3. With the id visible and copyable, the user or the other session addresses A by id — or resolves the current name from it — with no registry archaeology.

Additional Context

  • Observation, kept here rather than filed as a bug because n=1 each way: with unnamed sessions, one Reload Window registered TWO sessions per window — the resumed one (same id, new pid, new name) and a fresh, never-prompted one (new id, no transcript file), 3 ms apart in one window and 26 ms apart in the other, with no Untitled panel open. After naming both sessions in Session history, the next Reload — and a full close-and-reopen of VS Code — restored only the named sessions, model and effort kept. Possibly related: #90095. Happy to file it separately with repro steps if useful.
  • Side note from the same measurement: pid order does not say which session is the fresh one — the resumed session took the lower pid in one window and the higher in the other, on the same event.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗