-
Notifications
You must be signed in to change notification settings - Fork 735
Description
Love this extension! I'm using Claude Code through the VS Code native panel and noticed it doesn't pick up those sessions. Here's what I found investigating why:
Summary
Pixel Agents currently only maps characters to Claude Code terminal sessions (vscode.Terminal). However, Claude Code also runs as a native VS Code extension panel, and those sessions produce identical JSONL transcript files in the same location. They just aren't discovered because there's no terminal to map to.
How extension sessions work
- The VS Code extension communicates via WebSocket (not a terminal)
- Transcripts are written to the same
~/.claude/projects/{sanitized-path}/{uuid}.jsonlpath - The JSONL record format is identical — same
type,sessionId,message, tool usage, etc. - Sub-agent transcripts also appear in the same
{sessionId}/subagents/subdirectories
Available discovery signals
Since there's no vscode.Terminal object, extension sessions could be identified through:
| Signal | Location | Details |
|---|---|---|
| IDE lock files | ~/.claude/ide/{pid}.lock |
Contains workspace paths, IDE name, transport type ("ws") — but no session ID |
| JSONL modification time | ~/.claude/projects/{path}/*.jsonl |
Most recently modified file not mapped to a terminal is likely the active extension session |
<ide_opened_file> tags |
Inside JSONL user message content | Only present in extension sessions, never in terminal sessions — useful as a heuristic |
Suggested approach
The transcript parsing and activity detection logic would work unmodified. The change would be to decouple session discovery from vscode.Terminal lifecycle:
- During the project directory scan, identify active JSONL files not mapped to any terminal
- Use modification timestamps and/or
<ide_opened_file>heuristics to confirm it's an extension session - Spawn a character for it the same way terminal sessions get one — just without terminal lifecycle binding
Why this matters
Many users run Claude Code through the VS Code extension panel rather than the terminal. It would be great to see pixel agents working alongside the native extension experience.