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

# Overview

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

## Summary

The `Inputs` namespace contains classes for deserializing JSON data that Claude Code sends to hooks via stdin. Each hook event type has a corresponding input class.

## Input Classes

| Class | Hook Event | Description |
| - | - | - |
| `PreToolUseHookInput<T>` | PreToolUse | Received before a tool executes |
| `PostToolUseHookInput<T,R>` | PostToolUse | Received after a tool completes |
| `PermissionRequestHookInput<T>` | PermissionRequest | Received when permission is requested |
| `UserPromptSubmitHookInput` | UserPromptSubmit | Received when user submits a prompt |
| `StopHookInput` | Stop | Received when Claude finishes responding |
| `SubagentStopHookInput` | SubagentStop | Received when a subagent completes |
| `NotificationHookInput` | Notification | Received for notifications |
| `SessionStartHookInput` | SessionStart | Received when a session starts |
| `SessionEndHookInput` | SessionEnd | Received when a session ends |
| `PreCompactHookInput` | PreCompact | Received before context compaction |

All input classes inherit from `HookInputBase` which provides common properties like `SessionId`, `TranscriptPath`, and `CurrentWorkingDirectory`.

## Usage

### Deserializing Hook Input

Use `ClaudeHooksSerializer` to deserialize input from stdin:

```csharp theme={"dark"}
// For PreToolUse hooks
var input = ClaudeHooksSerializer.DeserializePreToolUseInput(Console.In.ReadToEnd());
Console.WriteLine($"Tool: {input?.ToolName}");
Console.WriteLine($"Session: {input?.SessionId}");

// For strongly-typed tool input (requires custom JsonSerializerContext)
var typedInput = ClaudeHooksSerializer.DeserializePreToolUseInput<MyToolInput>(
json, MyJsonContext.Default.PreToolUseHookInputMyToolInput);
```

### Common Base Properties

All inputs include these properties from `HookInputBase`:

* `SessionId` - Unique session identifier
* `TranscriptPath` - Path to conversation transcript
* `CurrentWorkingDirectory` - Active working directory
* `PermissionMode` - Current permission mode
* `HookEventName` - The event that triggered this hook

## Types

### &#x20;Classes

| Name | Summary |
| - | - |
| [BackgroundTaskSummary](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/BackgroundTaskSummary.md) | Represents in-flight background work registered in a session. |
| [HookInputBase](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/HookInputBase.md) | Base class containing common fields present in all hook inputs.  All hooks receive these fields via JSON through stdin. |
| [ModelSwitchHookInputBase](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/ModelSwitchHookInputBase.md) | Base class for the inputs received by hooks that run around a model switch. |
| [ToolHookInputBase](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/ToolHookInputBase.md) | Base class for tool-related hook inputs that contain tool name, input, and use ID.  Used as a base for PreToolUse and PostToolUse hook inputs. |
| [ConfigChangeHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/ConfigChangeHookInput.md) | Represents the input received by a ConfigChange hook.  This hook runs when a configuration setting changes. |
| [CwdChangedHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/CwdChangedHookInput.md) | Represents the input received by a CwdChanged hook.  This hook runs when the current working directory changes. |
| [DirectoryAddedHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/DirectoryAddedHookInput.md) | Represents the input received by a DirectoryAdded hook, which runs when a directory is added to the session. |
| [ElicitationHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/ElicitationHookInput.md) | Represents the input received by an Elicitation hook.  This hook runs when an elicitation dialog is presented to the user. |
| [ElicitationResultHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/ElicitationResultHookInput.md) | Represents the input received by an ElicitationResult hook.  This hook runs when the user responds to an elicitation dialog. |
| [FileChangedHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/FileChangedHookInput.md) | Represents the input received by a FileChanged hook.  This hook runs when a file is changed externally. |
| [HookEffortInfo](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/HookEffortInfo.md) | Represents the reasoning effort applied to the current turn. |
| [InstructionsLoadedHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/InstructionsLoadedHookInput.md) | Represents the input received by an InstructionsLoaded hook.  This hook runs when instructions (CLAUDE.md files, etc.) are loaded. |
| [McpServerProvenance](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/McpServerProvenance.md) | Represents the MCP server that provides a tool. |
| [MessageDisplayHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/MessageDisplayHookInput.md) | Represents the input received by a MessageDisplay hook, which runs as assistant message text is displayed. |
| [NotificationHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/NotificationHookInput.md) | Represents the input received by a Notification hook.  This hook runs when Claude Code sends notifications. |
| [PermissionDeniedHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PermissionDeniedHookInput.md) | Represents the input received by a PermissionDenied hook.  This hook runs when a permission request is denied. |
| [PermissionRequestHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PermissionRequestHookInput.md) | Represents the input received by a PermissionRequest hook.  This hook runs when a permission dialog is shown and can automatically allow or deny permissions. |
| [PostCompactHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PostCompactHookInput.md) | Represents the input received by a PostCompact hook.  This hook runs after a compact operation completes. |
| [PostModelSwitchHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PostModelSwitchHookInput.md) | Represents the input received by a PostModelSwitch hook, which runs after the session switches models. |
| [PostToolBatchHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PostToolBatchHookInput.md) | Represents the input received by a PostToolBatch hook, which runs once after every tool call in a batch has resolved. |
| [PostToolBatchToolCall](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PostToolBatchToolCall.md) | Represents one tool call in a resolved batch. |
| [PostToolUseFailureHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PostToolUseFailureHookInput.md) | Represents the input received by a PostToolUseFailure hook.  This hook runs after a tool call fails. |
| [PostToolUseHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PostToolUseHookInput.md) | Represents the input received by a PostToolUse hook.  This hook runs after tool calls complete and includes the tool's response. |
| [PreCompactHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PreCompactHookInput.md) | Represents the input received by a PreCompact hook.  This hook runs before a compact operation. |
| [PreModelSwitchHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PreModelSwitchHookInput.md) | Represents the input received by a PreModelSwitch hook, which runs before the session switches models. |
| [PreToolUseHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PreToolUseHookInput.md) | Represents the input received by a PreToolUse hook.  This hook runs before tool calls are executed and can block or modify them. |
| [SessionCronSummary](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SessionCronSummary.md) | Represents a session-scoped cron task that will wake a session later. |
| [SessionEndHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SessionEndHookInput.md) | Represents the input received by a SessionEnd hook.  This hook runs when a Claude Code session ends. |
| [SessionStartHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SessionStartHookInput.md) | Represents the input received by a SessionStart hook.  This hook runs when Claude Code starts a new session or resumes one. |
| [SetupHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SetupHookInput.md) | Represents the input received by a Setup hook, which runs during repository setup or maintenance. |
| [StopFailureHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/StopFailureHookInput.md) | Represents the input received by a StopFailure hook.  This hook runs when a stop hook itself fails. |
| [StopHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/StopHookInput.md) | Represents the input received by a Stop hook.  This hook runs when Claude Code finishes responding. |
| [SubagentStartHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SubagentStartHookInput.md) | Represents the input received by a SubagentStart hook.  This hook runs when a subagent task starts. |
| [SubagentStopHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SubagentStopHookInput.md) | Represents the input received by a SubagentStop hook.  This hook runs when subagent tasks complete. |
| [TaskCompletedHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/TaskCompletedHookInput.md) | Represents the input received by a TaskCompleted hook.  This hook runs when a task completes. |
| [TaskCreatedHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/TaskCreatedHookInput.md) | Represents the input received by a TaskCreated hook.  This hook runs when a task is created. |
| [TeammateIdleHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/TeammateIdleHookInput.md) | Represents the input received by a TeammateIdle hook.  This hook runs when a teammate agent becomes idle. |
| [UserPromptExpansionHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/UserPromptExpansionHookInput.md) | Represents the input received by a UserPromptExpansion hook, which runs when a slash command or MCP prompt expands into a prompt. |
| [UserPromptSubmitHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/UserPromptSubmitHookInput.md) | Represents the input received by a UserPromptSubmit hook.  This hook runs when the user submits a prompt, before Claude processes it. |
| [WorktreeCreateHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/WorktreeCreateHookInput.md) | Represents the input received by a WorktreeCreate hook.  This hook runs when a git worktree is created. |
| [WorktreeRemoveHookInput](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/WorktreeRemoveHookInput.md) | Represents the input received by a WorktreeRemove hook.  This hook runs when a git worktree is removed. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.