Skip to main content

Definition

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

Syntax

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 parameter. This response is received in the KillShellPostToolUsePayload 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):
{
"shellId": "shell_abc123",
"success": true
}
Example JSON payload (failed):
{
"shellId": "shell_invalid",
"success": false,
"error": "Shell not found or already terminated"
}

Constructors

.ctor

Syntax

public KillShellToolResponse()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

Error

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

Syntax

public string Error { get; set; }

Property Value

Type: string?

Examples

"Shell not found or already terminated"

Remarks

This property is populated when KillShellToolResponse.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 is true, this property will be null.

ShellId

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

Syntax

public string ShellId { get; set; }

Property Value

Type: string

Examples

"shell_abc123xyz"

Remarks

This is the shell ID that was provided in KillShellToolInput.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.

Success

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

Syntax

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 property for details about why the operation failed.

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?