HookInput
Defined in: index.d.ts:67
The hook contract’s input: Claude Code’s hook input, in every harness.
Indexable
Section titled “Indexable”[
key:string]:unknown
Properties
Section titled “Properties”
optionalcwd?:string
Defined in: index.d.ts:81
harness
Section titled “harness”harness:
string
Defined in: index.d.ts:78
The harness that ran the hook, e.g. “codex”.
hook_event_name
Section titled “hook_event_name”hook_event_name:
"SessionStart"|"SessionEnd"|"UserPromptSubmit"|"PreToolUse"|"PostToolUse"|"Stop"|"PreCompact"
Defined in: index.d.ts:69
Claude Code’s event name, e.g. “PreToolUse”.
last_assistant_message?
Section titled “last_assistant_message?”
optionallast_assistant_message?:string
Defined in: index.d.ts:96
prompt?
Section titled “prompt?”
optionalprompt?:string
Defined in: index.d.ts:83
Prompt submit: the user’s prompt.
session_id?
Section titled “session_id?”
optionalsession_id?:string
Defined in: index.d.ts:79
source?
Section titled “source?”
optionalsource?:string
Defined in: index.d.ts:93
Session start: what started it, e.g. “startup”.
stop_hook_active?
Section titled “stop_hook_active?”
optionalstop_hook_active?:boolean
Defined in: index.d.ts:95
Stop: the agent is already continuing because a stop hook asked it to.
tool_input?
Section titled “tool_input?”
optionaltool_input?:Record<string,unknown>
Defined in: index.d.ts:87
The tool’s input as Claude Code gives it: command for Bash, file_path for a file tool.
tool_kind?
Section titled “tool_kind?”
optionaltool_kind?:"shell"|"read"|"write"|"mcp"|"other"
Defined in: index.d.ts:89
What the tool call does.
tool_name?
Section titled “tool_name?”
optionaltool_name?:string
Defined in: index.d.ts:85
The tool, as Claude Code names it, e.g. “Bash”.
tool_response?
Section titled “tool_response?”
optionaltool_response?:unknown
Defined in: index.d.ts:91
Post tool: the tool’s output.
transcript_path?
Section titled “transcript_path?”
optionaltranscript_path?:string
Defined in: index.d.ts:80