claude_code.ClaudeCodeClient
A harness client: the authenticated Claude Code CLI as an `ai.Client`. The transport is a local process, not HTTP; the output contract travels natively via --json-schema; BAML tools ride the `outcome` envelope.
Signature
class claude_code.ClaudeCodeClientA harness client: the authenticated Claude Code CLI as an ai.Client.
The transport is a local process, not HTTP; the output contract travels
natively via --json-schema; BAML tools ride the outcome envelope.
Source:<builtin>/claude_code/cli.bamlbytes 223–2704
Fields
executable
stringmodel
stringcwd
string | nulltimeout_ms
intpermission_mode
stringharness_tools
string[]mcp_servers
map<string, baml.json.json>capture_wire
boolStatic methods
new
(Creates a client. Construction reads no environment variable, so declaring one is always safe; credentials and endpoints resolve when a request is built.
Implementations
ai.Client for claude_code.ClaudeCodeClient
Instance methods
id
(self) -> stringinvoke
(render
(self, input: ai.ModelTurnInput) -> baml.http.Request throws ai.errors.PreviewUnsupportedClaude Code is a process-backed client rather than an HTTP client; there is no wire Request to preview. Keep this explicit so adding render to ai.Client cannot accidentally invoke the CLI.
Source:<builtin>/claude_code/cli.bamlbytes 1874–2702