Skip to content

PromptHookHandler

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  1218167585["hooks.PromptHookHandler"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 1218167585
  2751680898 --> 2645524081

🛈 DocStrings

Bases: TypedDict

LLM prompt hook handler.

See https://code.claude.com/docs/en/hooks#prompt-and-agent-hook-fields

Source code in src/clawd_code_sdk/models/hooks.py
class PromptHookHandler(TypedDict):
    """LLM prompt hook handler.

    See https://code.claude.com/docs/en/hooks#prompt-and-agent-hook-fields
    """

    type: Literal["prompt"]
    prompt: str
    model: NotRequired[str]
    timeout: NotRequired[float]
    statusMessage: NotRequired[str]
    once: NotRequired[bool]

:fa-brands-github: Show source on GitHub