Skip to main content

Module exec

Module exec 

Source
Expand description

Process spawning and execution for the claude CLI.

Builds and runs the child process behind every command: applies the Claude client’s binary path, working directory, environment, and timeout, scrubs the CLAUDECODE env var so nested runs are not detected as recursive, drains stdout/stderr without deadlocking, and maps failures onto Error via from_command_failure. Both the async (tokio) and blocking (sync feature) paths live here.

Structs§

CommandOutput
Raw output from a claude CLI invocation.

Functions§

run_claude
Run a claude command with the given arguments.
run_claude_allow_exit_codes
Run a claude command and allow specific non-zero exit codes.
run_claude_allow_exit_codes_sync
Blocking mirror of run_claude_allow_exit_codes.
run_claude_sync
Blocking mirror of run_claude. Available with the sync feature.
run_claude_with_retry
Run a claude command with an optional per-command retry policy override.
run_claude_with_retry_sync
Blocking mirror of run_claude_with_retry.
run_claude_with_stdin_prompt
Run claude, writing stdin_content to the child’s stdin rather than passing the prompt as argv.
run_claude_with_stdin_prompt_sync
Blocking mirror of run_claude_with_stdin_prompt.