Skip to main content

Module protocol

Module protocol 

Source
Expand description

Claude Code hook protocol definitions.

Defines the JSON structures for PreToolUse hook input/output.

Structs§

AllowOutput
Empty output to allow command execution.
AllowWithModifiedCommandOutput
Output to allow with a modified command (for transparent interception). This tells Claude Code “allow this tool, but replace the command with this one”. Used when RCH has already executed remotely and wants to substitute a no-op.
AllowWithModifiedHookSpecificOutput
Hook-specific output for allow-with-modification responses.
DenyOutput
Output to deny/block command execution.
HookInput
Input received from Claude Code PreToolUse hook.
HookSpecificOutput
ToolInput
Tool-specific input for Bash commands.
UpdatedInput
The modified input to substitute.

Enums§

HookOutput
Output sent back to Claude Code from PreToolUse hook.