pub struct SubagentResult {
pub name: String,
pub final_response: String,
pub total_turns: usize,
pub tool_count: u32,
pub tool_logs: Vec<ToolCallLog>,
pub usage: TokenUsage,
pub success: bool,
pub duration_ms: u64,
pub error_details: Option<String>,
pub failed_tool: Option<String>,
}Expand description
Result from a subagent execution.
Fields§
§name: StringName of the subagent.
final_response: StringThe final text response (only visible part to parent).
total_turns: usizeTotal number of turns taken.
tool_count: u32Number of tool calls made by the subagent.
tool_logs: Vec<ToolCallLog>Log of tool calls made by the subagent.
usage: TokenUsageToken usage statistics.
success: boolWhether the subagent completed successfully.
duration_ms: u64Duration in milliseconds.
error_details: Option<String>Detailed error information when success is false.
Contains the raw error message from the agent event, which may include stack trace information or structured error context.
failed_tool: Option<String>Retained for serialization compatibility with older clients.
The previous implementation inferred this from the “last pending tool” when any generic error occurred, which was incorrect for LLM or transport failures. The field is currently never populated until the SDK has deterministic error provenance.
Trait Implementations§
Source§impl Clone for SubagentResult
impl Clone for SubagentResult
Source§fn clone(&self) -> SubagentResult
fn clone(&self) -> SubagentResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more