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

# BashToolResponse

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

## Definition

**Assembly:** CloudNimble.ClaudeEssentials.dll

**Namespace:** CloudNimble.ClaudeEssentials.Hooks.Tools.Responses

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.BashToolResponse
```

## 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](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/BashPostToolUsePayload.md)
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](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Inputs/BashToolInput.md#timeout) parameter.
If a command exceeds its timeout, it will be interrupted and [BashToolResponse.Interrupted](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/BashToolResponse.md#interrupted)
will be `true`.

Output exceeding 30,000 characters is automatically truncated by Claude Code.

Example JSON payload:

```csharp theme={"dark"}
{
  "stdout": "Hello, World!\r\n",
  "stderr": "",
  "interrupted": false,
  "isImage": false
}
```

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={"dark"}
public BashToolResponse()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;BackgroundCwdHint

Gets or sets the model-facing note that the session working directory was not changed by a backgrounded command.

#### Syntax

```csharp theme={"dark"}
public string BackgroundCwdHint { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;BackgroundedByUser

Gets or sets a value indicating whether the user manually backgrounded the command.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<bool> BackgroundedByUser { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

### &#x20;BackgroundEndsWithFinalResponse

Gets or sets a value indicating whether this backgrounded command is terminated at its caller's final response.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<bool> BackgroundEndsWithFinalResponse { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

### &#x20;BackgroundTaskId

Gets or sets the ID of the background task if the command is running in the background.

#### Syntax

```csharp theme={"dark"}
public string BackgroundTaskId { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;BackgroundWakesOwner

Gets or sets a value indicating whether the subagent that owns this backgrounded command parks for its end and is woken by it.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<bool> BackgroundWakesOwner { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

### &#x20;DangerouslyDisableSandbox

Gets or sets a value indicating whether sandbox mode was overridden.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<bool> DangerouslyDisableSandbox { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

### &#x20;GhRateLimitHint

Gets or sets the model-facing reminder appended when a gh command reports a GitHub API rate-limit error.

#### Syntax

```csharp theme={"dark"}
public string GhRateLimitHint { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;GitOperation

Gets or sets the structured classification of git and GitHub operations detected in this command.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.GitOperationInfo GitOperation { get; set; }
```

#### Property Value

Type: `CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.GitOperationInfo?`

### &#x20;Interrupted

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

#### Syntax

```csharp theme={"dark"}
public bool Interrupted { get; set; }
```

#### 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](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/BashToolResponse.md#stdout) and [BashToolResponse.Stderr](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/BashToolResponse.md#stderr) will
contain whatever output was captured before the interruption occurred.

### &#x20;IsImage

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

#### Syntax

```csharp theme={"dark"}
public System.Nullable<bool> IsImage { get; set; }
```

#### Property Value

Type: `System.Nullable<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](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/BashToolResponse.md#stdout) may contain base64-encoded image data
or be empty while the image is presented to Claude separately.

### &#x20;NoOutputExpected

Gets or sets a value indicating whether the command is expected to produce no output on success.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<bool> NoOutputExpected { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

### &#x20;PersistedOutputPath

Gets or sets the path to the persisted full output, set when the output is too large for inline.

#### Syntax

```csharp theme={"dark"}
public string PersistedOutputPath { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;PersistedOutputSize

Gets or sets the total size of the output in bytes, set when the output is too large for inline.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<long> PersistedOutputSize { get; set; }
```

#### Property Value

Type: `System.Nullable<long>?`

### &#x20;RawOutputPath

Gets or sets the path to the raw output file for large MCP tool outputs.

#### Syntax

```csharp theme={"dark"}
public string RawOutputPath { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;ReturnCodeInterpretation

Gets or sets the semantic interpretation for non-error exit codes with special meaning.

#### Syntax

```csharp theme={"dark"}
public string ReturnCodeInterpretation { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;StaleReadFileStateHint

Gets or sets a model-facing note listing `readFileState` entries whose modification
time changed during the execution of this command.

#### Syntax

```csharp theme={"dark"}
public string StaleReadFileStateHint { get; set; }
```

#### Property Value

Type: `string?`

#### Remarks

Claude Code tracks the modification time of files it has previously read. When a Bash
command matches the harness's `WRITE_COMMAND_MARKERS` heuristic (for example,
commands that write, move, or generate files), the harness checks whether any tracked
files had their mtime bumped while the command was running and surfaces that information
here.

This hint exists so the model can re-read stale files before acting on cached content;
it is `null` when the heuristic did not fire or no tracked files were touched.

### &#x20;Stderr

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

#### Syntax

```csharp theme={"dark"}
public string Stderr { get; set; }
```

#### 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](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/BashToolResponse.md#stderr) does not necessarily indicate success, and a
non-empty [BashToolResponse.Stderr](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/BashToolResponse.md#stderr) does not necessarily indicate failure. Check
the actual content and context to determine the command's success.

### &#x20;Stdout

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

#### Syntax

```csharp theme={"dark"}
public string Stdout { get; set; }
```

#### 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](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/BashToolResponse.md#isimage) will be `true`.

### &#x20;StructuredContent

Gets or sets the structured content blocks.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.List<System.Text.Json.JsonElement> StructuredContent { get; set; }
```

#### Property Value

Type: `System.Collections.Generic.List<System.Text.Json.JsonElement?>?`

### &#x20;TimedOutAfterMs

Gets or sets the timeout value in milliseconds, set when the command hit its timeout and was auto-backgrounded.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<long> TimedOutAfterMs { get; set; }
```

#### Property Value

Type: `System.Nullable<long>?`

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`


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