Skip to content

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

fix(agent): restrict bus-backed builtin check to dynamic builtin prompts

Steven Enamakelbf579619b81e
diff --git a/crates/openhuman-core/src/agent/prompts/flow_archetype.rs b/crates/openhuman-core/src/agent/prompts/flow_archetype.rs
index 52ccd79986..845571f425 100644
--- a/crates/openhuman-core/src/agent/prompts/flow_archetype.rs
+++ b/crates/openhuman-core/src/agent/prompts/flow_archetype.rs
@@ -1,7 +1,7 @@
//! Scoped TinyFlows archetype prompt loading for the two flow builtins.
use anyhow::{anyhow, ensure, Result};
-use tinyagents_definition::PromptSource;
+use tinyagents_definition::{DefinitionSource, PromptSource};
use crate::{agent::harness::host_definition::AgentDefinition, config::Config};
@@ -10,7 +10,9 @@ use crate::{agent::harness::host_definition::AgentDefinition, config::Config};
/// User definitions and static/session prompt overrides keep their own source
/// and never cause a TinyFlows module lookup, even when they reuse a builtin id.
pub(crate) fn is_bus_backed_builtin(definition: &AgentDefinition) -> bool {
- prompt_owner(definition).is_some()
+ matches!(&definition.source, DefinitionSource::Builtin)
+ && matches!(&definition.system_prompt, PromptSource::Dynamic(()))
+ && matches!(definition.id.as_str(), "workflow_builder" | "flow_discovery")
}
/// Prompt owner stamped by the builtin loader and preserved by cloned specs.