-
Notifications
You must be signed in to change notification settings - Fork 708
Description
Description
Sub-agent characters are not spawned on the Pixel Agents map when Claude Code uses the Agent tool to launch sub-agents. Only the parent agent character is visible.
Root Cause Analysis
After investigating the JSONL transcript files, I found two issues:
Issue 1: Tool name mismatch (Agent vs Task)
Pixel Agents expects the tool to be named "Task", but Claude Code (at least in VSCode extension / Claude Agent SDK context) uses "Agent" as the tool name.
In extension.js, the progress handler Pr() filters with:
if(o.activeToolNames.get(l)!=="Task") return;And the status generator it() only has:
case "Task": { ... return `Subtask: ${...}` }The Agent tool is not recognized, so:
- No
"Subtask: ..."status is generated for it - Progress records from
Agentsub-agents are silently dropped
Suggested fix: Add "Agent" as an alias for "Task" in both places:
// Status generator
case "Agent":
case "Task": { ... }
// Progress handler
if(o.activeToolNames.get(l)!=="Task" && o.activeToolNames.get(l)!=="Agent") return;Issue 2: agent_progress records missing in Claude Code 2.1.71+
Even with the above patch applied locally, sub-agents still don't appear. Comparing JSONL transcripts:
- Claude Code 2.1.69: Emits
agent_progressrecords in the parent session JSONL withdata.type: "agent_progress"andparentToolUseID— Pixel Agents can detect sub-agent activity. - Claude Code 2.1.71: No
agent_progressrecords are emitted. Onlyhook_progressrecords appear. The sub-agent tool calls (Agent) are recorded astool_use/tool_resultblocks, but without the streaming progress records that Pixel Agents relies on to spawn and animate sub-agent characters.
This means that even with Issue 1 fixed, Pixel Agents cannot detect sub-agents in Claude Code 2.1.71+ because the data it needs is simply not written to the JSONL file.
Environment
- Pixel Agents: v1.0.2
- Claude Code: v2.1.69 (agent_progress works) and v2.1.71 (agent_progress missing)
- Platform: Linux (VSCode Remote SSH / vscode-server)
- Extension path:
~/.vscode-server/extensions/pablodelucca.pixel-agents-1.0.2/
Steps to Reproduce
- Open a Pixel Agents terminal with "+ Agent"
- Run a command that launches sub-agents (e.g., a PR review skill that spawns multiple specialized agents via the
Agenttool) - Only the parent agent appears on the map; sub-agents are never spawned
Evidence
JSONL from Claude Code 2.1.69 (sub-agents detected):
{
"type": "progress",
"parentToolUseID": "toolu_01G1pN...",
"data": {
"type": "agent_progress",
"agentId": "aef9bb38...",
"message": { "type": "assistant", ... }
}
}JSONL from Claude Code 2.1.71 (no agent_progress at all):
$ grep "agent_progress" session-2.1.71.jsonl | wc -l
0
Suggested Next Steps
- Fix Issue 1 (tool name
AgentvsTask) in Pixel Agents - Open a companion issue on Claude Code asking about the removal of
agent_progressrecords in 2.1.71+, or adapt Pixel Agents to detect sub-agents from thetool_use/tool_resultblocks directly