Skip to content

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

fix(embed): map mcp cleanup harness errors

Steven Enamakel4981af51ae07
diff --git a/crates/openhuman-embed/src/agent/build.rs b/crates/openhuman-embed/src/agent/build.rs
index ab72d1eaad..e056ddab15 100644
--- a/crates/openhuman-embed/src/agent/build.rs
+++ b/crates/openhuman-embed/src/agent/build.rs
@@ -472,6 +472,7 @@ fn map_harness_err(err: crate::HarnessError) -> AgentError {
crate::HarnessError::Workspace { what, source } => AgentError::Workspace { what, source },
crate::HarnessError::Invalid(msg) => AgentError::Invalid(msg),
crate::HarnessError::Call(e) => AgentError::Call(e),
+ crate::HarnessError::McpCleanup(e) => AgentError::McpCleanup(e),
crate::HarnessError::Build(e) => AgentError::Invalid(format!("{e:#}")),
crate::HarnessError::AlreadyRunning => AgentError::Invalid(err.to_string()),
}
diff --git a/crates/openhuman-embed/src/runtime/build.rs b/crates/openhuman-embed/src/runtime/build.rs
index ce598b84ad..62f10d98a7 100644
--- a/crates/openhuman-embed/src/runtime/build.rs
+++ b/crates/openhuman-embed/src/runtime/build.rs
@@ -507,6 +507,7 @@ fn map_ws(err: crate::HarnessError) -> RuntimeError {
crate::HarnessError::Workspace { what, source } => RuntimeError::Workspace { what, source },
crate::HarnessError::Invalid(msg) => RuntimeError::Invalid(msg),
crate::HarnessError::Build(e) => RuntimeError::Build(e),
+ crate::HarnessError::McpCleanup(e) => RuntimeError::Build(e.into()),
crate::HarnessError::Call(e) => RuntimeError::Call(e),
crate::HarnessError::AlreadyRunning => RuntimeError::AlreadyRunning,
}