ClaudeCode.Hook.Output (ClaudeCode v0.36.3)
View SourceTop-level hook output struct returned to the CLI.
Wraps common fields (:continue, :decision, :stop_reason, etc.) and an
optional :hook_specific_output carrying event-specific data.
Most hooks can use shorthand returns instead of building this struct directly:
# These are equivalent:
:ok
%Output{}
{:halt, stop_reason: "done"}
%Output{continue: false, stop_reason: "done"}
{:block, reason: "Rate limited"}
%Output{decision: "block", reason: "Rate limited"}See ClaudeCode.Hook for the full shorthand reference.
Fields
:continue- whether the agent should keep running (falseto halt):suppress_output- suppress the hook's output from the conversation:stop_reason- reason string when halting:decision-"block"to block a user prompt submission:system_message- system message to inject into the conversation:reason- human-readable reason for the decision:hook_specific_output- event-specific output struct (e.g.PreToolUse,PostToolUse)
Summary
Types
@type decision() :: String.t()
@type hook_specific_output() :: ClaudeCode.Hook.Output.PreToolUse.t() | ClaudeCode.Hook.Output.PostToolUse.t() | ClaudeCode.Hook.Output.PostToolUseFailure.t() | ClaudeCode.Hook.Output.UserPromptSubmit.t() | ClaudeCode.Hook.Output.SessionStart.t() | ClaudeCode.Hook.Output.Notification.t() | ClaudeCode.Hook.Output.SubagentStart.t() | ClaudeCode.Hook.Output.PreCompact.t() | ClaudeCode.Hook.Output.PermissionRequest.t()