Skip to content
Prompty

HookEndPayload

Payload for “hook_end” events — a host lifecycle hook finished.

---
title: HookEndPayload
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class HookEndPayload {
        +string hookInvocationId
        +string hookType
        +string scope
        +boolean success
        +dictionary output
        +float64 durationMs
        +string error
        +RedactionMetadata redaction
    }
    class RedactionMetadata {
        +boolean sanitized
        +RedactedField[] fields
        +string policy
    }
    HookEndPayload *-- RedactionMetadata
hookInvocationId: hook_abc123
hookType: preToolUse
success: true
durationMs: 12
error: hook failed
Name Type Description
hookInvocationId string Stable hook invocation identifier
hookType string Host-defined hook type
scope string Whether the hook is scoped to a turn or the outer session
success boolean Whether the hook completed successfully
output dictionary Hook output after host-side sanitization
durationMs float64 Hook execution duration in milliseconds
error string Human-readable error when success is false
redaction RedactionMetadata Redaction state for sensitive hook output fields

The following types are composed within HookEndPayload: