Definition
Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools.Responses Inheritance: System.ObjectSyntax
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 thetool_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
objectSyntax
Properties
Interrupted
Gets or sets a value indicating whether the command was interrupted before completion.Syntax
Property Value
Type:bool
Remarks
Whentrue, 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
Whentrue, 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
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?