SyncHookJSONOutput
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| dict builtins dict() -> new empty dictionary |
|
⋔ Inheritance diagram¶
graph TD
2628884760["hooks.SyncHookJSONOutput"]
2645524081["builtins.dict"]
2751680898["builtins.object"]
2645524081 --> 2628884760
2751680898 --> 2645524081
🛈 DocStrings¶
Bases: TypedDict
Synchronous hook output with control and decision fields.
This defines the structure for hook callbacks to control execution and provide feedback to Claude.
Common Control Fields
continue_: Whether Claude should proceed after hook execution (default: True). Note: This is converted to "continue" when sent to the CLI. suppressOutput: Hide stdout from transcript mode (default: False). stopReason: Message shown when continue is False.
Decision Fields
decision: Set to "block" to indicate blocking behavior. systemMessage: Warning message displayed to the user. reason: Feedback message for Claude about the decision.
Hook-Specific Output
hookSpecificOutput: Event-specific controls (e.g., permissionDecision for PreToolUse, additionalContext for PostToolUse).
Note: The CLI documentation shows field names without underscores ("async", "continue"), but Python code should use the underscore versions ("async_", "continue_") as they are automatically converted.