Session ID not visible in VS Code panel — unsafe when running multiple sessions
Problem
When running multiple Claude Code panels in VS Code simultaneously, there is no way to identify which session ID belongs to which panel. This makes context management unsafe.
Context — Why This Matters
Running 4 parallel Claude sessions for 6+ hours with ZERO crashes — a record. Active context trimming (cutting session JSONL files down to target sizes) was critical to achieving that stability. The trimming works. The problem is you can't tell which session you're trimming.
What Happened
Running 4 Claude panels in parallel (RADIUS, INFRASTRUCTURE, FINDER & CLIENT, and a read panel), each doing different work for hours. Needed to trim session context files to manage memory (~124MB across 6 sessions).
The only way to identify a session is by running:
ls -t ~/.claude/projects/-Users-tim001/*.jsonl | grep -v agent- | head -1 | xargs basename | sed 's/.jsonl//'
This command returns whichever session file was most recently modified globally — not the one belonging to the panel that ran it. When multiple Claudes are active and writing to their session files, the result changes on every invocation. Running it twice in the same panel returned two different session IDs.
Result: trimmed the wrong session files without knowing it. A core development session (nonces/client code) got cut from 17MB to 3MB because we couldn't tell which panel owned which session ID.
Evidence
Screenshots show 4 panels each running the same ls -t command:
- Each panel gets a different result
- Running it again in the same panel returns a DIFFERENT session ID
- Session IDs rotate between panels depending on timing
- Two panels reported the same session ID at one point (appeared as a "split")
Expected Behavior
- Session ID visible in the panel tab at all times — every Claude panel should show its session ID (or a short hash of it) in the tab title, always visible
- A built-in command or variable (e.g.
/session-idor$CLAUDE_SESSION_ID) to reliably get the current panel's own session identity - Session list command showing panel name <-> session ID mapping
Impact
- Cannot safely manage context across parallel sessions
- Cannot trim/monitor specific sessions without risk of hitting the wrong one
- No way to audit which panel is using which session file
- Context trimming is KEY to long-running stability (6hrs, 4 parallel sessions, zero crashes) but blind trimming is dangerous
- Running multiple Claude panels (common for parallel workstreams) becomes a guessing game
Environment
- Claude Code extension v2.1.39 (darwin-arm64)
- VS Code with 4 simultaneous Claude panels
- macOS, Darwin 25.2.0
- Session files at
~/.claude/projects/-Users-tim001/*.jsonl
Suggested Fix
Display [abc123] (first 6-8 chars of session UUID) in the panel tab title. Minimal UI change, solves the entire problem.
---
Reported from a live multi-session build session, Feb 13 2026 ~2:30 AM EST
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗