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 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):
Example JSON payload (failed):

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

Error

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

Syntax

Property Value

Type: string?

Examples

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

Property Value

Type: string

Examples

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

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

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?