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

Method clear_loop_checkpoint

core/src/agent_api/session_persistence.rs:119–131  ·  view source on GitHub ↗

Delete the loop checkpoint for `run_id` once the run has reached a terminal state in-process. The checkpoint exists only to survive a process crash; once the run returns (completed / failed / cancelled) it is dead weight. No-op when no store is configured. Errors are warn-logged — a failed cleanup must never mask the run's result.

(&self, run_id: &str)

Source from the content-addressed store, hash-verified

117 /// it is dead weight. No-op when no store is configured. Errors are
118 /// warn-logged — a failed cleanup must never mask the run's result.
119 pub(super) async fn clear_loop_checkpoint(&self, run_id: &str) {
120 let Some(store) = &self.session_store else {
121 return;
122 };
123 if let Err(e) = store.delete_loop_checkpoint(run_id).await {
124 tracing::warn!(
125 run_id = %run_id,
126 session_id = %self.session_id,
127 "Failed to delete loop checkpoint on run completion: {}",
128 e
129 );
130 }
131 }
132}
133
134pub(super) fn load_session_data(

Callers 2

completeMethod · 0.80
wrapMethod · 0.80

Calls 1

Tested by

no test coverage detected