list_active_subagents
View currently active subagents and their operational status to monitor task delegation progress in development workflows.
Instructions
List currently active subagents and their status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:358-388 (handler)The main handler function for the 'list_active_subagents' tool. It maps over active subagent sessions, computes durations, and returns a formatted text response listing all active sessions with their details.async listActiveSubagents() { const sessions = Array.from(this.activeSubagents.entries()).map(([id, session]) => ({ session_id: id, task: session.task, agent_count: session.agents.length, execution_mode: session.execution_mode, status: session.status, start_time: session.startTime, end_time: session.endTime || null, duration: session.endTime ? `${Math.round((session.endTime - session.startTime) / 1000)}s` : `${Math.round((new Date() - session.startTime) / 1000)}s (ongoing)` })); return { content: [ { type: 'text', text: sessions.length > 0 ? `Active Subagent Sessions:\n\n${sessions.map(s => `Session: ${s.session_id}\n` + `Task: ${s.task}\n` + `Agents: ${s.agent_count} (${s.execution_mode})\n` + `Status: ${s.status}\n` + `Duration: ${s.duration}\n` ).join('\n')}` : 'No active subagent sessions.' } ] }; }
- src/index.js:119-125 (registration)Registration of the 'list_active_subagents' tool in the ListTools response, including name, description, and empty input schema.name: 'list_active_subagents', description: 'List currently active subagents and their status', inputSchema: { type: 'object', properties: {} } },
- src/index.js:153-154 (handler)Dispatch case in the CallToolRequestHandler that routes calls to the listActiveSubagents handler.case 'list_active_subagents': return await this.listActiveSubagents();
- src/index.js:121-124 (schema)Input schema for the tool, which expects no parameters (empty properties).inputSchema: { type: 'object', properties: {} }