NAME
Claude::Agent::Hook::Context - Context passed to hook callbacks
DESCRIPTION
The third argument of a hook callback. The CLI's fields are copied from the hook input for convenience; loop and query are the Perl side's.
ATTRIBUTES
Every attribute is optional and has a has_* predicate.
hook_event_name
The event, for example PreToolUse.
session_id
The session the event belongs to.
cwd
The session's working directory.
transcript_path
Path of the session transcript.
permission_mode
The permission mode in force.
tool_name
The tool, for tool events.
tool_input
The tool's input, for tool events.
tool_use_id
The tool use the event concerns.
loop
The IO::Async::Loop the query runs on, for callbacks that return a Future.
query
The Claude::Agent::Query the event arrived on.
METHODS
new
Takes a flat list of name/value pairs. Unknown names are ignored.
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).