NAME
Claude::Agent::Message::Result - Result message type
DESCRIPTION
Represents the final result of a query.
ATTRIBUTES
type - Always 'result'
subtype - Result type: 'success', 'error_max_turns', 'error_during_execution', etc.
uuid - Unique message identifier
session_id - Session identifier
result - The final result text
is_error - Boolean indicating if this is an error result
duration_ms - Total duration in milliseconds
num_turns - Number of conversation turns
total_cost_usd - Total cost in USD
usage - Token usage statistics
structured_output - Parsed structured output if output_format was specified
RESULT SUBTYPES
success - Query completed successfully
error_max_turns - Reached maximum turn limit
error_during_execution - Error occurred during execution
error_max_structured_output_retries - Could not produce valid structured output
METHODS
is_success
if ($msg->is_success) { ... }
Helper to check if the result was successful.
AUTHOR
LNATION, <email at lnation.org>
LICENSE
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under The Artistic License 2.0 (GPL Compatible).