Skip to content

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

fix(agent): handle missing artifact type in parallel agent spawn

Steven Enamakel7a8716159135
diff --git a/crates/openhuman-core/src/agent/artifacts/types.rs b/crates/openhuman-core/src/agent/artifacts/types.rs
index a554983387..666d55d0cc 100644
--- a/crates/openhuman-core/src/agent/artifacts/types.rs
+++ b/crates/openhuman-core/src/agent/artifacts/types.rs
@@ -101,6 +101,15 @@ pub struct ArtifactMeta {
/// disk after a redux-persist purge / fresh-device boot.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub thread_id: Option<String>,
+ /// Provider-assigned tool-call id of the producing tool invocation,
+ /// captured at [`super::store::create_artifact`] time and carried on
+ /// every lifecycle event (`ArtifactPending`/`Ready`/`Failed`) so the UI
+ /// can correlate the card with the tool-call bubble that produced it.
+ /// `None` for producers that ran outside a harness tool-call context
+ /// (CLI, cron) and for `meta.json` files written before this field
+ /// existed.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub tool_call_id: Option<String>,
}
#[cfg(test)]
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs
index d9379702a1..88b050053e 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs
@@ -89,6 +89,7 @@ pub(crate) async fn execute_spawn_parallel_agents(
workspace_descriptor: Option<tinytools::WorkspaceDescriptor>,
run_context: crate::agent::tinyagents::host::OpenHumanRunContext,
live_parent: Option<&RunContext<crate::agent::tinyagents::host::OpenHumanRunContext>>,
+ parent_call_id: Option<String>,
) -> anyhow::Result<ToolResult> {
tracing::debug!("[spawn_parallel_agents] execute entry");
let tasks = match parse_parallel_agent_tasks(&args) {