ClaudeAgentSDK.Errors.CLIConnectionError exception (claude_agent_sdk v0.11.0)

Copy Markdown View Source

Raised when the SDK fails to connect to the Claude CLI process.

Common causes include:

  • Working directory does not exist or is inaccessible
  • Claude CLI crashed during startup
  • Port/transport layer communication failure

Fields

  • :message - Human-readable error description
  • :cwd - Working directory that was attempted (if available)
  • :reason - Underlying error reason

Summary

Types

t()

@type t() :: %ClaudeAgentSDK.Errors.CLIConnectionError{
  __exception__: true,
  cwd: String.t() | nil,
  message: String.t(),
  reason: term()
}