Skip to main content

Summary

The Outputs namespace contains classes for serializing JSON responses that hooks send to Claude Code via stdout. All output classes inherit from HookOutputBase which provides Continue, StopReason, SuppressOutput, and SystemMessage properties.

Usage

Creating and Serializing Output

Exit Codes

  • 0: Success - stdout is parsed as JSON
  • 2: Blocking error - stderr is shown to Claude/user
  • Other: Non-blocking error - shown in verbose mode only

Common Base Properties

All outputs inherit from HookOutputBase:
  • Continue - Whether to continue (default: true)
  • StopReason - Message when Continue is false
  • SuppressOutput - Hide from transcript
  • SystemMessage - Warning message for Claude

Types

Classes