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

# KillShellToolResponse

> Represents the response payload returned by the Claude Code KillShell tool after attempting to terminate a background shell process.

## Definition

**Assembly:** CloudNimble.ClaudeEssentials.dll

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

**Inheritance:** System.Object

## Syntax

```csharp theme={null}
CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.KillShellToolResponse
```

## Summary

Represents the response payload returned by the Claude Code KillShell tool after
attempting to terminate a background shell process.

## Remarks

The KillShell tool terminates running background bash shells by their ID. Background
shells are created when using the [BashToolInput.RunInBackground](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Inputs/BashToolInput.md#runinbackground) parameter.
This response is received in the [KillShellPostToolUsePayload](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/KillShellPostToolUsePayload.md)
when the `tool_name` is "KillShell".

Background shells are useful for long-running processes like development servers,
file watchers, or build processes that need to run while other work continues.
The KillShell tool provides a way to gracefully terminate these processes when
they are no longer needed.

Shell IDs can be found using the `/tasks` command in Claude Code.

Example JSON payload (successful):

```csharp theme={null}
{
  "shellId": "shell_abc123",
  "success": true
}
```

Example JSON payload (failed):

```csharp theme={null}
{
  "shellId": "shell_invalid",
  "success": false,
  "error": "Shell not found or already terminated"
}
```

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={null}
public KillShellToolResponse()
```

### &#x20;.ctor Inherited

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

#### Syntax

```csharp theme={null}
public Object()
```

## Properties

### &#x20;Error

Gets or sets the error message if the kill operation failed.

#### Syntax

```csharp theme={null}
public string Error { get; set; }
```

#### Property Value

Type: `string?`

#### Examples

```csharp theme={null}
"Shell not found or already terminated"
```

#### Remarks

This property is populated when [KillShellToolResponse.Success](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/KillShellToolResponse.md#success) is `false`.
Common error scenarios include:

* The shell ID does not exist
* The shell has already been terminated
* The shell process could not be killed due to system restrictions
* The shell ID format is invalid

When [KillShellToolResponse.Success](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/KillShellToolResponse.md#success) is `true`, this property will be `null`.

### &#x20;ShellId

Gets or sets the identifier of the shell that was targeted for termination.

#### Syntax

```csharp theme={null}
public string ShellId { get; set; }
```

#### Property Value

Type: `string`

#### Examples

```csharp theme={null}
"shell_abc123xyz"
```

#### Remarks

This is the shell ID that was provided in [KillShellToolInput.ShellId](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Inputs/KillShellToolInput.md#shellid).
Shell IDs are assigned when background shells are created and follow the format
`"shell_"` followed by a unique identifier.

Available shell IDs can be discovered using the `/tasks` command in Claude Code.

### &#x20;Success

Gets or sets a value indicating whether the shell was successfully terminated.

#### Syntax

```csharp theme={null}
public bool Success { get; set; }
```

#### Property Value

Type: `bool`

#### Remarks

When `true`, the shell process was found and terminated successfully.
The shell is no longer running and its resources have been released.

When `false`, the termination failed. Check the [KillShellToolResponse.Error](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/KillShellToolResponse.md#error) property
for details about why the operation failed.

## Methods

### &#x20;Equals Inherited Virtual

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

#### Syntax

```csharp theme={null}
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={null}
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={null}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

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

#### Syntax

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

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

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

#### Syntax

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

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

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

#### Syntax

```csharp theme={null}
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={null}
public virtual string ToString()
```

#### Returns

Type: `string?`


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