Skip to main content

run_claude

Function run_claude 

Source
pub async fn run_claude(
    claude: &Claude,
    args: Vec<String>,
) -> Result<CommandOutput>
Expand description

Run a claude command with the given arguments.

If the Claude client has a retry policy set, transient errors will be retried according to that policy. A per-command retry policy can be passed to override the client default.

Dropping the returned future mid-flight kills the spawned claude process and, on Unix, its whole process group (SIGKILL): an abandoned run does not keep executing in the background, and the subprocesses it spawned for tool use die with it.