[ENHANCEMENT] Custom Tools: Streaming Output Support & NPM Package Dependencies for Agent Orchestration Workflows #10323
ilxqx
started this conversation in
Feature Requests
Replies: 2 comments 1 reply
-
|
@ilxqx - Thanks for the feedback. I agree with both suggestions and we'll add support for both soon, so stay tuned. We intended to properly support npm package dependencies for the initial version, so it's a bug that it's not working out of the box. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Partly addressed by: #10336 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'd like to propose two enhancements to the experimental Custom Tools feature (introduced in v3.37) that would unlock powerful agent orchestration capabilities:
These enhancements would enable building sophisticated multi-agent workflows by orchestrating tools like Claude Agent SDK (
@anthropic-ai/claude-agent-sdk) and OpenAI Codex CLI directly within Roo Code.Problem Statement
1. Long-running tools provide no feedback
Currently, Custom Tools can only return results after complete execution. For complex workflows that may take several minutes (e.g., orchestrating multiple AI coding agents), users face:
2. No support for npm dependencies
Custom Tools currently cannot easily use npm packages. This severely limits the creative potential:
@anthropic-ai/claude-agent-sdk(Claude Agent SDK)@openai/codex(Codex CLI SDK)Use Case: Multi-Agent Coding Orchestration with Claude Agent SDK
I want to build a Custom Tool that orchestrates Claude Agent SDK to solve complex coding tasks. The SDK returns an
AsyncGenerator<SDKMessage>that streams messages in real-time, but without Roo Code Custom Tools supporting streaming output, all these real-time events are lost - users see nothing until the entire task completes.Current Limitation (No Streaming)
Problem: The Claude Agent SDK beautifully streams
SDKAssistantMessage,SDKPartialAssistantMessage, tool use events, etc. in real-time. But since Roo Code Custom Tools don't support streaming output, users stare at a blank screen for 5-10+ minutes while the agent works.Ideal Implementation (With Streaming Support)
Multi-Agent Orchestration Example
Proposed API for Streaming
Option A: AsyncGenerator Pattern (Recommended)
Option B: Context Callback
NPM Dependencies Proposal
Recommended: Tool-local package.json
Roo Code could:
.roo/tools/package.jsonon startupnpm installifnode_modulesis missing/staleBenefits
Specific Use Cases Enabled
Why This Matters
The Claude Agent SDK is designed for streaming - it returns
AsyncGenerator<SDKMessage>with rich event types:SDKAssistantMessage- Complete assistant responsesSDKPartialAssistantMessage- Real-time streaming chunksSDKSystemMessage- Session initializationSDKResultMessage- Final results with cost/usageWithout Custom Tools streaming support, we lose all this real-time capability. Users must wait 5-10+ minutes seeing nothing, then receive a massive dump of output. This is a significant UX degradation.
Related
Beta Was this translation helpful? Give feedback.
All reactions