Skip to content

recursive run

Execute a single goal and exit.

bash
recursive run [OPTIONS] <GOAL>

Arguments

ArgumentDescription
<GOAL>The goal string to pass to the agent

Options

OptionDefaultDescription
--workspace <path>cwdFilesystem sandbox root
--max-steps <n>32Step budget
--session <id>(new)Resume an existing session
--system-prompt-file <path>(built-in)Custom system prompt
--jsonoffOutput result as JSON

Examples

bash
# Basic usage
recursive run "list files in src/ and summarise the architecture"

# With a specific workspace
recursive run --workspace /my/project "review the recent changes"

# Resume a session
recursive run --session abc123 "continue where we left off"

# JSON output
recursive run --json "what is 2+2" | jq .finish_reason

Exit codes

CodeMeaning
0FinishReason::NoMoreToolCalls or FinishReason::ProviderStop
1Runtime error (returned as Err(...))
2FinishReason::BudgetExceeded
3FinishReason::Stuck

Released under the MIT License.