Skip to content

BashOutput

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  1167028418["output_types.BashOutput"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 1167028418
  2751680898 --> 2645524081

🛈 DocStrings

Bases: TypedDict

tool_use_result for the Bash tool.

Source code in src/clawd_code_sdk/models/output_types.py
class BashOutput(TypedDict):
    """``tool_use_result`` for the Bash tool."""

    stdout: str
    """Standard output from the command."""
    stderr: str
    """Standard error from the command."""
    interrupted: bool
    """Whether the command was interrupted."""
    isImage: NotRequired[bool]
    """Whether the output is an image."""
    noOutputExpected: NotRequired[bool]
    """Whether the command is expected to produce no output on success."""
    backgroundTaskId: NotRequired[str]
    """Task ID when ``run_in_background=true`` was used."""
    backgroundedByUser: NotRequired[bool]
    """True if the user manually backgrounded the command with Ctrl+B."""
    rawOutputPath: NotRequired[str]
    """Path to raw output file for large MCP tool outputs."""
    dangerouslyDisableSandbox: NotRequired[bool]
    """Whether sandbox mode was overridden."""
    returnCodeInterpretation: NotRequired[str]
    """Semantic interpretation for non-error exit codes with special meaning."""
    structuredContent: NotRequired[list[Any]]
    """Structured content blocks."""
    persistedOutputPath: NotRequired[str]
    """Path to persisted full output (when output is too large for inline)."""
    persistedOutputSize: NotRequired[int]
    """Total size of the output in bytes (when output is too large for inline)."""
    staleReadFileStateHint: NotRequired[str]
    """Model-facing note listing readFileState entries whose mtime bumped during this command."""
    # tokenSaverOutput: NotRequired[str]
    # """Compressed output sent to model when token-saver is active (UI still uses stdout)."""
    ghRateLimitHint: NotRequired[str]
    """Model-facing sys-reminder appended when a gh cmd reports a GitHub API rate-limit error."""
    timedOutAfterMs: NotRequired[float]
    """Set when the command hit its timeout and was auto-backgrounded; the timeout in ms."""
    backgroundCwdHint: NotRequired[str]
    """Note that the session cwd was not changed by a backgrounded directory-change command."""
    backgroundEndsWithFinalResponse: NotRequired[Literal[True]]
    """True when this backgrounded command is terminated at its caller's final response."""
    backgroundWakesOwner: NotRequired[Literal[True]]
    """True when the subagent owning this backgrounded command is woken by its end."""
    gitOperation: NotRequired[BashGitOperation]
    """Structured classification of git/gh operations detected in this command."""

backgroundCwdHint instance-attribute

backgroundCwdHint: NotRequired[str]

Note that the session cwd was not changed by a backgrounded directory-change command.

backgroundEndsWithFinalResponse instance-attribute

backgroundEndsWithFinalResponse: NotRequired[Literal[True]]

True when this backgrounded command is terminated at its caller's final response.

backgroundTaskId instance-attribute

backgroundTaskId: NotRequired[str]

Task ID when run_in_background=true was used.

backgroundWakesOwner instance-attribute

backgroundWakesOwner: NotRequired[Literal[True]]

True when the subagent owning this backgrounded command is woken by its end.

backgroundedByUser instance-attribute

backgroundedByUser: NotRequired[bool]

True if the user manually backgrounded the command with Ctrl+B.

dangerouslyDisableSandbox instance-attribute

dangerouslyDisableSandbox: NotRequired[bool]

Whether sandbox mode was overridden.

ghRateLimitHint instance-attribute

ghRateLimitHint: NotRequired[str]

Model-facing sys-reminder appended when a gh cmd reports a GitHub API rate-limit error.

gitOperation instance-attribute

gitOperation: NotRequired[BashGitOperation]

Structured classification of git/gh operations detected in this command.

interrupted instance-attribute

interrupted: bool

Whether the command was interrupted.

isImage instance-attribute

isImage: NotRequired[bool]

Whether the output is an image.

noOutputExpected instance-attribute

noOutputExpected: NotRequired[bool]

Whether the command is expected to produce no output on success.

persistedOutputPath instance-attribute

persistedOutputPath: NotRequired[str]

Path to persisted full output (when output is too large for inline).

persistedOutputSize instance-attribute

persistedOutputSize: NotRequired[int]

Total size of the output in bytes (when output is too large for inline).

rawOutputPath instance-attribute

rawOutputPath: NotRequired[str]

Path to raw output file for large MCP tool outputs.

returnCodeInterpretation instance-attribute

returnCodeInterpretation: NotRequired[str]

Semantic interpretation for non-error exit codes with special meaning.

staleReadFileStateHint instance-attribute

staleReadFileStateHint: NotRequired[str]

Model-facing note listing readFileState entries whose mtime bumped during this command.

stderr instance-attribute

stderr: str

Standard error from the command.

stdout instance-attribute

stdout: str

Standard output from the command.

structuredContent instance-attribute

structuredContent: NotRequired[list[Any]]

Structured content blocks.

timedOutAfterMs instance-attribute

timedOutAfterMs: NotRequired[float]

Set when the command hit its timeout and was auto-backgrounded; the timeout in ms.

:fa-brands-github: Show source on GitHub