Skip to main content

resume_run

Function resume_run 

Source
pub fn resume_run(
    previous: &RunAgentInput,
    run_id: impl Into<RunId>,
    entries: impl Into<Vec<ResumeEntry>>,
) -> RunAgentInput
Expand description

Builds the request that resumes a paused run.

Everything the paused run was given — messages, state, tools, context — is carried over, because the agent is continuing the same conversation. What changes is the run id and the resume payload.

A new run id, not the paused one: the resumed run emits its own RUN_STARTED, and reusing the finished run’s id would make two runs in one thread indistinguishable in a log. Servers that key resumption on the original id should be passed that id explicitly.