Skip to content

fix: support Agent tool for sub-agent visualization#64

Open
erichprates wants to merge 1 commit intopablodelucca:mainfrom
erichprates:fix/agent-tool-subagent-visualization
Open

fix: support Agent tool for sub-agent visualization#64
erichprates wants to merge 1 commit intopablodelucca:mainfrom
erichprates:fix/agent-tool-subagent-visualization

Conversation

@erichprates
Copy link

The Agent tool (used by Claude Code's Task tool invocations) was not being visualized as a sub-agent character in the Pixel Agents office.

Three changes in transcriptParser.ts:

  1. Add 'Agent' to PERMISSION_EXEMPT_TOOLS so it does not trigger the false permission-wait heuristic while the sub-agent is running.

  2. Add case 'Agent': before case 'Task': in formatToolStatus so the status string starts with "Subtask: ". The webview checks for this prefix to call addSubagent() and spawn a new pixel character linked to the parent agent.

  3. Include 'Agent' in the subagentClear guard so the spawned character is correctly despawned when the Agent tool completes.

The Agent tool (used by Claude Code's Task tool invocations) was not
being visualized as a sub-agent character in the Pixel Agents office.

Three changes in transcriptParser.ts:

1. Add 'Agent' to PERMISSION_EXEMPT_TOOLS so it does not trigger the
   false permission-wait heuristic while the sub-agent is running.

2. Add `case 'Agent':` before `case 'Task':` in formatToolStatus so
   the status string starts with "Subtask: <description>". The webview
   checks for this prefix to call addSubagent() and spawn a new pixel
   character linked to the parent agent.

3. Include 'Agent' in the subagentClear guard so the spawned character
   is correctly despawned when the Agent tool completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drewf
Copy link

drewf commented Mar 6, 2026

I independently found the same issue and submitted a similar fix in #76. My PR also covers a 4th location that this one is missing: the progress record handler in processProgressRecord() (~line 207) that validates the parent tool name. Without that fix, sub-agent progress records (tool activity within sub-agents) are silently ignored for the Agent tool.

Happy to close mine if this one adds that 4th fix, or the maintainer can pick whichever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants