feat: add VS Code extension panel session support#77
Open
drewf wants to merge 2 commits intopablodelucca:mainfrom
Open
feat: add VS Code extension panel session support#77drewf wants to merge 2 commits intopablodelucca:mainfrom
drewf wants to merge 2 commits intopablodelucca:mainfrom
Conversation
Claude Code renamed the sub-agent tool from 'Task' to 'Agent', breaking sub-agent character spawning. The transcript parser only recognized 'Task' in four places: - PERMISSION_EXEMPT_TOOLS set - formatToolStatus switch (generates 'Subtask:' status prefix) - Tool completion handler (clears sub-agent tracking) - Progress record handler (validates parent tool type) Add 'Agent' alongside 'Task' in all four locations so sub-agent characters spawn correctly with current Claude Code versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detect and track Claude Code sessions running in the VS Code native extension panel (WebSocket transport), not just terminal-based sessions. Changes: - Make terminalRef optional in AgentState, add isExternal flag - Add external session scanning (5s interval) for untracked JSONL files - Auto-adopt recently-modified JSONL files as external agents - Auto-remove stale external agents after 5min inactivity - Handle optional terminalRef in focusAgent/closeAgent handlers - Persist/restore external agents across window reloads The JSONL transcript format is identical between terminal and extension sessions, so the existing parsing pipeline works unmodified. Only session discovery and lifecycle management needed changes (~15% of code).
|
+1 |
3 similar comments
|
+1 |
|
+1 |
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for Claude Code sessions running in the VS Code native extension panel (WebSocket transport, no terminal object). These sessions produce identical JSONL transcripts but were invisible because pixel-agents was coupled to vscode.Terminal.
Approach: Scan the project JSONL directory for active files not tracked by any agent, and adopt them as "external" sessions. Inspired by PR #43's external agent scanner concept, simplified without tmux features.
Changes:
Note: Depends on #76 (fix: recognize 'Agent' tool name for sub-agent visualization) — merge that first for sub-agent visualization to work correctly.
Closes #74