Skip to main content

run_claude

Function run_claude 

Source
pub fn run_claude(
    binary: &Path,
    prompt: &str,
    json_schema: &str,
    input_text: &str,
    model: Option<&str>,
    timeout_secs: u64,
    max_turns: u32,
) -> Result<ClaudeResult, AppError>
Expand description

Calls claude -p with prompt and schema, waits with timeout, and parses output.

G03: parses stdout even on non-zero exit to detect terminal_reason: "max_turns".