MCPcopy Create free account
hub / github.com/AI45Lab/Code / execute_from_messages_seeded

Method execute_from_messages_seeded

core/src/agent_api/runtime.rs:122–145  ·  view source on GitHub ↗

Execute from a prebuilt message list, seeding the loop's cumulative metrics from a checkpoint. Used by `resume_run` so resumed runs continue token/tool-call accounting from the checkpoint instead of re-starting at zero.

(
        self,
        messages: Vec<Message>,
        session_id: &str,
        seed: Option<crate::agent::ExecutionSeed>,
    )

Source from the content-addressed store, hash-verified

120 /// continue token/tool-call accounting from the checkpoint instead of
121 /// re-starting at zero.
122 pub(super) async fn execute_from_messages_seeded(
123 self,
124 messages: Vec<Message>,
125 session_id: &str,
126 seed: Option<crate::agent::ExecutionSeed>,
127 ) -> Result<AgentResult> {
128 let Self {
129 agent_loop,
130 runtime_tx,
131 cancel_token,
132 runtime_collector,
133 lifecycle,
134 } = self;
135 let result = agent_loop
136 .execute_from_messages_seeded(
137 messages,
138 Some(session_id),
139 Some(runtime_tx),
140 Some(&cancel_token),
141 seed,
142 )
143 .await;
144 lifecycle.complete(runtime_collector, result).await
145 }
146}
147
148pub(super) struct StreamRunContext {

Callers 2

execute_from_messagesMethod · 0.45
resume_runFunction · 0.45

Calls 1

completeMethod · 0.45

Tested by

no test coverage detected