feat: unified ephemeral activities for parallel tool calls (CYPACK-886)#937
Open
cyrusagent wants to merge 2 commits intomainfrom
Open
feat: unified ephemeral activities for parallel tool calls (CYPACK-886)#937cyrusagent wants to merge 2 commits intomainfrom
cyrusagent wants to merge 2 commits intomainfrom
Conversation
When Claude runs multiple tools in parallel, instead of posting separate activities for each tool, present a single unified ephemeral activity with a tree-like view showing all parallel tools and their status. - Add extractAllToolInfo/extractAllToolResultInfo to detect parallel tool_use blocks in assistant messages - Track parallel tool groups per session with progressive status updates - Post unified ephemeral activities with tree formatting (├─/└─ with ⏳/✅/❌ status icons) - Suppress individual result activities for parallel groups - Add formatParallelToolGroup to IMessageFormatter and all 4 runners - Add 11 tests covering parallel detection, ephemeral posting, result suppression, partial updates, and single-tool fallback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Assignee: Connor Turland
Summary
When Claude runs multiple tools in parallel (e.g., 6 Explore agents simultaneously), each tool was previously posted as a separate activity in the Linear timeline, creating a cluttered, broken-looking view. This PR introduces unified ephemeral activities that present all parallel tools in a single tree-like view with live status updates, matching Claude Code's native parallel agent display.
Before: Individual activities flood the timeline for each parallel tool call
After: One compact ephemeral activity with tree formatting (├─/└─) and status icons (⏳/✅/❌) that updates progressively as tools complete
Changes
packages/core/src/agent-runner-types.ts— AddedformatParallelToolGroup()to theIMessageFormatterinterfacepackages/edge-worker/src/AgentSessionManager.ts— Core parallel detection and unified activity posting:extractAllToolInfo()/extractAllToolResultInfo()to detect multiple tool blocks per message (replacing single-block.find())parallelToolGroupsMap for tracking concurrent tool groups per sessionpostParallelGroupActivity()posts unified ephemeral activities with progressive status updatespackages/{claude,codex,cursor,gemini}-runner/src/formatter.ts—formatParallelToolGroup()implementation with tree-like markdown formattingpackages/edge-worker/test/AgentSessionManager.parallel-tools.test.ts— 11 new testsTesting
Linear Issue
CYPACK-886