Skip to content

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

fix(agent_cli): include source error in session agent build failure

Steven Enamakel3bbd5930765b
diff --git a/crates/openhuman-core/src/core/agent_cli/debug/mod.rs b/crates/openhuman-core/src/core/agent_cli/debug/mod.rs
index 785b376b0c..66e1505352 100644
--- a/crates/openhuman-core/src/core/agent_cli/debug/mod.rs
+++ b/crates/openhuman-core/src/core/agent_cli/debug/mod.rs
@@ -186,7 +186,7 @@ async fn render_via_session(
agent_id: &str,
) -> Result<DumpedPrompt> {
let mut agent = OpenHumanSessionHost::from_config_for_agent(ctx, config, agent_id)
- .with_context(|| format!("building session agent for `{agent_id}`"))?;
+ .map_err(|error| anyhow::anyhow!("building session agent for `{agent_id}`: {error:#}"))?;
// Use the live turn prelude's hydration and surface reconciliation so this
// snapshot matches what the runtime will send, without starting a model turn.