Skip to main content

Definition

Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools Inheritance: CloudNimble.ClaudeEssentials.Hooks.Inputs.PostToolUseHookInput<CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput, CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.BashToolResponse>

Syntax

CloudNimble.ClaudeEssentials.Hooks.Tools.BashPostToolUsePayload

Summary

Represents the complete payload delivered to a PostToolUse hook after the Bash tool has executed.

Remarks

This payload contains all context provided to your hook after Claude executes the Bash tool, including session information, the original tool input, and the tool’s response. Use this type for strongly-typed deserialization of PostToolUse hook payloads when tool_name is “Bash”. The Bash tool executes shell commands. Your hook receives both the command that was run and its stdout/stderr output, enabling logging, output filtering, or error detection. <strong>Terminology:</strong>

Examples

var payload = JsonSerializer.Deserialize&lt;BashPostToolUsePayload&gt;(json);
if (payload.ToolResponse.Interrupted)
    Console.WriteLine($"Command timed out: {payload.ToolInput.Command}");

Constructors

.ctor

Syntax

public BashPostToolUsePayload()

.ctor Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.PostToolUseHookInput<CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput, CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.BashToolResponse>

Syntax

public PostToolUseHookInput()

.ctor Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.ToolHookInputBase<CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput>

Syntax

protected ToolHookInputBase()

.ctor Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.HookInputBase

Syntax

protected HookInputBase()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

CurrentWorkingDirectory Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.HookInputBase
Gets or sets the current working directory where Claude Code is running.

Syntax

public string CurrentWorkingDirectory { get; set; }

Property Value

Type: string

HookEventName Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.HookInputBase
Gets or sets the name of the hook event that triggered this input.

Syntax

public CloudNimble.ClaudeEssentials.Hooks.HookEventName HookEventName { get; set; }

Property Value

Type: CloudNimble.ClaudeEssentials.Hooks.HookEventName

PermissionMode Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.HookInputBase
Gets or sets the permission mode under which Claude Code is operating.

Syntax

public CloudNimble.ClaudeEssentials.Hooks.PermissionMode PermissionMode { get; set; }

Property Value

Type: CloudNimble.ClaudeEssentials.Hooks.PermissionMode

SessionId Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.HookInputBase
Gets or sets the unique identifier for the current Claude Code session.

Syntax

public string SessionId { get; set; }

Property Value

Type: string

ToolInput Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.ToolHookInputBase<CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput>
Gets or sets the input parameters for the tool. The schema depends on the specific tool being invoked.

Syntax

public CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput ToolInput { get; set; }

Property Value

Type: CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput?

ToolName Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.ToolHookInputBase<CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput>
Gets or sets the name of the tool being invoked. Common tool names include: Write, Edit, Bash, Read, Grep, Glob, Task, WebFetch, WebSearch. MCP tools follow the pattern: mcp__<server>__<tool>.

Syntax

public string ToolName { get; set; }

Property Value

Type: string

ToolResponse Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.PostToolUseHookInput<CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput, CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.BashToolResponse>
Gets or sets the response data returned by the tool. The schema depends on the specific tool that was invoked.

Syntax

public CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.BashToolResponse ToolResponse { get; set; }

Property Value

Type: CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.BashToolResponse?

ToolUseId Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.ToolHookInputBase<CloudNimble.ClaudeEssentials.Hooks.Tools.Inputs.BashToolInput>
Gets or sets the unique identifier for this specific tool use instance. Typically follows the pattern: toolu_01ABC123…

Syntax

public string ToolUseId { get; set; }

Property Value

Type: string

TranscriptPath Inherited

Inherited from CloudNimble.ClaudeEssentials.Hooks.Inputs.HookInputBase
Gets or sets the file path to the transcript JSONL file for the current session. This file contains the full conversation history.

Syntax

public string TranscriptPath { get; set; }

Property Value

Type: string

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?