> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Summary of the CloudNimble.ClaudeEssentials.Hooks.Outputs Namespace

## 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

```csharp theme={"dark"}
// Simple output - allow operation to continue
var output = new PreToolUseHookOutput<object> { Continue = true };
Console.WriteLine(ClaudeHooksSerializer.SerializePreToolUseOutput(output));

// Block an operation
var blockOutput = new StopHookOutput
{
    Decision = HookDecision.Block,
    Reason = "Tests must pass before stopping"
};
Console.WriteLine(ClaudeHooksSerializer.SerializeStopOutput(blockOutput));
```

### 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

### <Icon icon="file-brackets-curly" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} /> Classes

| Name                                                                                                                                          | Summary                                                                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [HookOutputBase](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/HookOutputBase)                                   | Base class containing common fields for all hook outputs.              Hook outputs are written to stdout as JSON when the hook exits with code 0.          |
| [HookSpecificOutputBase](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/HookSpecificOutputBase)                   | Base class for hook-specific output data.              Contains the hook event name and serves as base for specific output types.                           |
| [NotificationHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/NotificationHookOutput)                   | Represents the output for a Notification hook.              The Notification hook typically only uses base output fields.                                   |
| [PermissionRequestDecision](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PermissionRequestDecision)             | Represents the decision object for a PermissionRequest hook response.              Contains the behavior decision and optional parameters.                  |
| [PermissionRequestHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PermissionRequestHookOutput)         | Represents the complete output for a PermissionRequest hook.              Combines base output fields with PermissionRequest-specific output.               |
| [PermissionRequestSpecificOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PermissionRequestSpecificOutput) | Represents the hook-specific output for a PermissionRequest hook.              Contains the decision object with behavior and optional parameters.          |
| [PostToolUseHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PostToolUseHookOutput)                     | Represents the complete output for a PostToolUse hook.              Combines base output fields with PostToolUse-specific output.                           |
| [PostToolUseSpecificOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PostToolUseSpecificOutput)             | Represents the hook-specific output for a PostToolUse hook.              Contains additional context to provide to Claude after tool execution.             |
| [PreCompactHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PreCompactHookOutput)                       | Represents the output for a PreCompact hook.              The PreCompact hook typically only uses base output fields.                                       |
| [PreToolUseHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PreToolUseHookOutput)                       | Represents the complete output for a PreToolUse hook.              Combines base output fields with PreToolUse-specific output.                             |
| [PreToolUseSpecificOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/PreToolUseSpecificOutput)               | Represents the hook-specific output for a PreToolUse hook.              Contains permission decisions and optional input modifications.                     |
| [SessionEndHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/SessionEndHookOutput)                       | Represents the output for a SessionEnd hook.              The SessionEnd hook typically only uses base output fields.                                       |
| [SessionStartHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/SessionStartHookOutput)                   | Represents the complete output for a SessionStart hook.              Combines base output fields with SessionStart-specific output.                         |
| [SessionStartSpecificOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/SessionStartSpecificOutput)           | Represents the hook-specific output for a SessionStart hook.              Contains additional context to add to the session start.                          |
| [StopHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/StopHookOutput)                                   | Represents the output for a Stop hook.              Used to optionally block Claude from stopping and continue processing.                                  |
| [SubagentStopHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/SubagentStopHookOutput)                   | Represents the output for a SubagentStop hook.              Used to optionally block a subagent from stopping and continue processing.                      |
| [UserPromptSubmitHookOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/UserPromptSubmitHookOutput)           | Represents the complete output for a UserPromptSubmit hook.              Combines base output fields with UserPromptSubmit-specific output.                 |
| [UserPromptSubmitSpecificOutput](/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Outputs/UserPromptSubmitSpecificOutput)   | Represents the hook-specific output for a UserPromptSubmit hook.              Contains additional context to add to Claude's processing of the user prompt. |
