isSubagentTool static method

bool isSubagentTool(
  1. String? toolName
)

SSE heartbeats and tool names use the subagent_ prefix (e.g. subagent_spawn).

Implementation

static bool isSubagentTool(String? toolName) =>
    toolName?.trim().toLowerCase().startsWith('subagent_') ?? false;