pub async fn run_loop_with_context(
agent: &dyn Agent,
tools: HashMap<String, Arc<dyn Tool>>,
run_ctx: RunContext,
execution_ctx: RunExecutionContext,
cancellation_token: Option<RunCancellationToken>,
state_committer: Option<Arc<dyn StateCommitter>>,
decision_rx: Option<UnboundedReceiver<ToolCallDecision>>,
) -> LoopOutcomeExpand description
Run the full agent loop until completion, suspension, cancellation, or error.
This is the primary non-streaming entry point. Tools are passed directly and used as the default tool set unless the agent’s step_tool_provider is set (for dynamic per-step tool resolution).