Repository navigation
Agent Flow: ACP chats of Claude Code draw their sub-agents (#459) - #463
Merged
Merged
Conversation
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.
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.
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 plainthinkstep 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):Agent/Tasktool is adelegatestep that spawns a sub-agent named after its description (kept across updates that omit the name).parentToolUseId, and a permission asked for it, runs as that sub-agent.The IDE side that keeps
_metaon its events and transcript cards goes toidein the companion PR (thev1.3.0branch has no IDE chat code).Tests
agentFlowCore.test.cjs: ACP sequence with an Agent call and sub-agent tools gives a delegate withspawns, sub-agent steps withactor, 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