factor_agent.llm.claude_code.ClaudeCodeBackend#

class ClaudeCodeBackend(model, effort=None, executable='claude', timeout_seconds=900.0)[source]#

Bases: object

Complete a request with one headless Claude Code call.

Parameters:
modelstr

The --model of every call.

effortstr, optional

The --effort of every call; Claude Code’s default if None.

executablestr

The Claude Code command.

timeout_secondsfloat

Seconds a call may take.

Methods#

ClaudeCodeBackend.command

The command line of every call; the prompt goes on stdin.

ClaudeCodeBackend.complete

Run the call and read its JSON reply.

ClaudeCodeBackend.from_config

Build from a role's config: model and optionally effort, executable and timeout_seconds.

Attributes#

ClaudeCodeBackend.OPTIONS = ('effort', 'executable', 'timeout_seconds')#

The options a role’s config may give besides backend and model.