Skip to content

Agent Flow: ACP chats of Claude Code draw their sub-agents (#459) - #463

Merged
aMonteSl merged 1 commit into
v1.3.0from
claude/project-thread-oeo43e-subagents
Dec 3, 2026
Merged

aMonteSl merged 1 commit into
v1.3.0from
claude/project-thread-oeo43e-subagents

Conversation

@aMonteSl

@aMonteSl aMonteSl commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Requested by Adrián · project thread

Fixes #459 (part of epic #319, follow-up of #453).

Summary

In the IDE, Watch in XR reads a Claude Code chat over ACP. Claude Code names each tool and the sub-agent that ran it only in _meta.claudeCode (toolName, parentToolUseId), so the Agent call became a plain think step and every sub-agent tool was drawn on the main agent: the hangar never launched a UFO.

This PR is the shared core part (acpSessionEvents.ts):

  • An Agent/Task tool is a delegate step that spawns a sub-agent named after its description (kept across updates that omit the name).
  • A tool stamped with parentToolUseId, and a permission asked for it, runs as that sub-agent.

The IDE side that keeps _meta on its events and transcript cards goes to ide in the companion PR (the v1.3.0 branch has no IDE chat code).

Tests

  • agentFlowCore.test.cjs: ACP sequence with an Agent call and sub-agent tools gives a delegate with spawns, sub-agent steps with actor, a permission waiting in the sub-agent, and two actors in the dataset.
  • npm test: 1445 + 645 passing, lint at the 151-warning budget.

Docs

docs/agent-flow/hangar.md ("Where sub-agents come from"), CHANGELOG [1.3.0].


Generated by Claude Code

Claude Code names each tool and the sub-agent that ran it only in
_meta.claudeCode (toolName, parentToolUseId) on ACP updates. The shared core
mapper now reads both: an Agent/Task tool is a delegate that spawns a
sub-agent named after its description, and tools (and permissions) stamped
with its call id run as that sub-agent, so the hangar launches their UFOs.
The IDE side that carries _meta into these events lands on the ide branch.

- Tests: core mapper + dataset actors.
- Docs: hangar.md (where sub-agents come from), CHANGELOG.
@aMonteSl aMonteSl self-assigned this Dec 3, 2026
@aMonteSl
aMonteSl merged commit 7b17713 into v1.3.0 Dec 3, 2026
11 checks passed
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