Repository navigation
Agent Flow: IDE Claude Code chats draw their sub-agents (#459) - #464
Merged
Merged
Conversation
The IDE reads its chats over ACP, where Claude Code names each tool and the sub-agent that ran it only in _meta.claudeCode (toolName, parentToolUseId). The IDE dropped _meta, so the Agent call was a think step and every tool of a sub-agent was drawn on the main agent: the hangar never launched a UFO. - IDE: keep toolName and parentToolUseId on tool events and transcript cards, and replay them when a chat is seeded. - Core: an Agent/Task tool is a delegate that spawns a sub-agent named after its description; tools (and permissions) stamped with its call id run as that sub-agent. - Tests: core mapper + dataset actors, IDE _meta mapping, feed live and seeded. - 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). Same core commit as the
v1.3.0PR, plus the IDE side.Summary
Adrián's manual test of #453 in the IDE: the hangar stood but no sub-agent UFO left it. Watch in XR reads the chat over ACP, and
acpMapping.tsdropped the update's_meta, where Claude Code names each tool (toolName) and the sub-agent it ran in (parentToolUseId).toolEventkeeps both from_meta.claudeCode(claudeCodeToolMeta);SessionEvent/TranscriptItemtool entries and the reducer store them;transcriptAsEventsreplays them when a chat is seeded.acpSessionEvents.ts):Agent/Taskis adelegatethat spawns a sub-agent; tools and permissions stamped with its call id run as that sub-agent.Chats stored before this fix have no
_meta, so they keep showing only the main agent; a new chat is needed to see the hangar.Tests
agentFlowCore.test.cjs(delegate, sub-agent actors, dataset).agentSessions.test.ts(_metamapping),agentFlowFeed.test.ts(sub-agents live and seeded from the transcript).npm test: extension 1457 passing, IDE 1198 passing (1 skipped), lint at budget.Docs
docs/agent-flow/hangar.md, CHANGELOG [1.3.0].Generated by Claude Code