pub struct PostToolUseFailureInput {
pub session_id: String,
pub timestamp: i64,
pub working_directory: PathBuf,
pub tool_name: String,
pub tool_args: Value,
pub error: String,
}Expand description
Input for the postToolUseFailure hook — received after a tool execution
whose result was "failure".
postToolUse only fires for successful tool executions. Register a handler
for postToolUseFailure to observe failed tool calls. The CLI extracts the
failure message from the tool result and passes it as the error field
(rather than passing the full result object).
Fields§
§session_id: StringThe runtime session ID of the session that triggered the hook.
timestamp: i64Unix timestamp (ms).
working_directory: PathBufWorking directory.
tool_name: StringName of the tool that failed.
tool_args: ValueArguments that were passed to the tool.
error: StringFailure message extracted from the tool’s result.
Trait Implementations§
Source§impl Clone for PostToolUseFailureInput
impl Clone for PostToolUseFailureInput
Source§fn clone(&self) -> PostToolUseFailureInput
fn clone(&self) -> PostToolUseFailureInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostToolUseFailureInput
impl Debug for PostToolUseFailureInput
Source§impl<'de> Deserialize<'de> for PostToolUseFailureInput
impl<'de> Deserialize<'de> for PostToolUseFailureInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PostToolUseFailureInput
impl RefUnwindSafe for PostToolUseFailureInput
impl Send for PostToolUseFailureInput
impl Sync for PostToolUseFailureInput
impl Unpin for PostToolUseFailureInput
impl UnsafeUnpin for PostToolUseFailureInput
impl UnwindSafe for PostToolUseFailureInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more