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 agent directory gracefully

Steven Enamakel131fb05fa7ac
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader.rs b/crates/openhuman-core/src/agent/registry/agents/loader.rs
index 5c5ff194bf..e170737a32 100644
--- a/crates/openhuman-core/src/agent/registry/agents/loader.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/loader.rs
@@ -21,15 +21,12 @@
//!
//! 1. [`load_builtins`] walks [`BUILTINS`].
//! 2. For each entry, parses `agent.toml` into an [`AgentDefinition`].
-//! 3. Replaces the (unset) `system_prompt` with `PromptSource::Inline(prompt.md contents)`.
-//! 4. Stamps `source = DefinitionSource::Builtin`.
+//! 3. Replaces the (unset) `system_prompt` with `PromptSource::Dynamic(prompt_fn)`
+//! and installs the optional `graph_fn` result as the turn graph.
+//! 4. Stamps `source = DefinitionSource::Builtin` and checks the folder id
+//! matches the TOML `id`.
//! 5. Returns the full `Vec<AgentDefinition>`, in the order listed in [`BUILTINS`].
//!
-//! The synthetic `fork` definition is *not* listed here — it's a
-//! byte-stable replay of the parent and has no standalone prompt. It is
-//! added by [`crate::agent::harness::builtin_definitions::all`] on top of the
-//! loader output.
-//!
//! Workspace-level overrides (`$OPENHUMAN_WORKSPACE/agents/*.toml`) are
//! handled separately by [`crate::agent::harness::definition_loader`] and merged
//! into the global registry, where they replace built-ins on `id`