Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(running_subagents): handle spawn ledger insert failure gracefully

Steven Enamakel4c1e305040d2
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs
index 55d6eaa044..e296636131 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs
@@ -90,7 +90,7 @@ pub(crate) fn record_spawned(
parent_thread_id: Option<&str>,
) {
let workspace = workspace_dir.display().to_string();
- ledger_spawned(
+ if let Err(err) = ledger_spawned(
task_store_for_workspace(workspace_dir).as_ref(),
&SpawnedSubagent {
task_id,
@@ -101,7 +101,11 @@ pub(crate) fn record_spawned(
workspace_dir: &workspace,
parent_thread_id,
},
- );
+ ) {
+ log::debug!(
+ "[running_subagents] spawn ledger insert ignored task_id={task_id} error={err}"
+ );
+ }
}
/// Record a cancellation (`CancelRequested` → `Cancelled`) for `task_id`.