Skip to content

Agent Flow: IDE Claude Code chats draw their sub-agents (#459) - #464

Merged
aMonteSl merged 1 commit into
idefrom
claude/project-thread-oeo43e-ide-subagents
Dec 3, 2026
Merged

aMonteSl merged 1 commit into
idefrom
claude/project-thread-oeo43e-ide-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). Same core commit as the v1.3.0 PR, 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.ts dropped the update's _meta, where Claude Code names each tool (toolName) and the sub-agent it ran in (parentToolUseId).

  • IDE: toolEvent keeps both from _meta.claudeCode (claudeCodeToolMeta); SessionEvent/TranscriptItem tool entries and the reducer store them; transcriptAsEvents replays them when a chat is seeded.
  • Core (acpSessionEvents.ts): Agent/Task is a delegate that 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

  • Core: agentFlowCore.test.cjs (delegate, sub-agent actors, dataset).
  • IDE: agentSessions.test.ts (_meta mapping), 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

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.
@aMonteSl aMonteSl self-assigned this Dec 3, 2026
@aMonteSl
aMonteSl merged commit 018bf7b into ide Dec 3, 2026
13 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