Skip to main content

Definition

Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools.Responses Inheritance: System.Object

Syntax

Summary

Represents the response payload returned by the Claude Code Bash tool after executing a shell command.

Remarks

The Bash tool executes shell commands in a persistent shell session. This response is received in the BashPostToolUsePayload when the tool_name is “Bash”. Commands have a default timeout of 120 seconds (2 minutes), which can be extended up to 600 seconds (10 minutes) using the BashToolInput.Timeout parameter. If a command exceeds its timeout, it will be interrupted and BashToolResponse.Interrupted will be true. Output exceeding 30,000 characters is automatically truncated by Claude Code. Example JSON payload:

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

Interrupted

Gets or sets a value indicating whether the command was interrupted before completion.

Syntax

Property Value

Type: bool

Remarks

When true, the command did not complete normally. This typically occurs when:
  • The command exceeded its timeout (default 120 seconds, max 600 seconds)
  • The user manually cancelled the operation
  • The command was killed by the system When a command is interrupted, BashToolResponse.Stdout and BashToolResponse.Stderr will contain whatever output was captured before the interruption occurred.

IsImage

Gets or sets a value indicating whether the output contains image data.

Syntax

Property Value

Type: bool

Remarks

When true, the command produced image output that Claude can interpret visually. This is used for commands that generate images or graphical output. Claude is a multimodal LLM and can process image data directly. When this is true, the BashToolResponse.Stdout may contain base64-encoded image data or be empty while the image is presented to Claude separately.

Stderr

Gets or sets the standard error (stderr) output from the executed command.

Syntax

Property Value

Type: string

Remarks

This contains all text written to stderr by the command. Many commands write warnings, progress information, or diagnostic messages to stderr even when successful. An empty BashToolResponse.Stderr does not necessarily indicate success, and a non-empty BashToolResponse.Stderr does not necessarily indicate failure. Check the actual content and context to determine the command’s success.

Stdout

Gets or sets the standard output (stdout) from the executed command.

Syntax

Property Value

Type: string

Remarks

This contains all text written to stdout by the command. On Windows, line endings will typically be CRLF (\r\n), while on Unix-like systems they will be LF (\n). If the output exceeds 30,000 characters, it will be truncated by Claude Code. For commands that produce binary output (like image generation), this may be empty and BashToolResponse.IsImage will be true.

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?