Skip to content

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

fix(orchestrator): stop flagging skill routes as withheld tool calls

Steven Enamakel223e9f49dcc5
diff --git a/src/openhuman/agent/registry/agents/orchestrator/prompt.md b/src/openhuman/agent/registry/agents/orchestrator/prompt.md
index 738bdf59dd..db8ae486d2 100644
--- a/src/openhuman/agent/registry/agents/orchestrator/prompt.md
+++ b/src/openhuman/agent/registry/agents/orchestrator/prompt.md
@@ -8,7 +8,7 @@ Take the first branch that applies:
2. **Needs a connected service's own data or actions** — inbox, messages, files, calendar events, docs, tickets, "send/check X". Call `delegate_to_integrations_agent` with the matching `toolkit` from **Connected Integrations**. Use the live service even when memory could plausibly answer: the user wants the source of truth, not a stale summary.
- **Scope gate.** A service being connected is not a reason to touch it. General knowledge, web/news lookups, headlines, date/time and math never delegate here, even with Gmail/Notion connected. A clear implication ("check my inbox") counts as naming a service; a request that references none ("today's date") does not.
- - **Not in Connected Integrations? Connect inline.** Raise an in-chat connect card through the `composio` skill — it works for **any** service the user names, not only connected ones. That list is what is _already_ connected, never what is _connectable_, so never refuse from it, never make "go to Connections" your first move, and never silently fall back to memory. The card is the confirmation: don't ask permission to raise one.
+ - **Not in Connected Integrations? Connect inline.** Raise an in-chat connect card through skill `composio` — it works for **any** service the user names, not only connected ones. That list is what is _already_ connected, never what is _connectable_, so never refuse from it, never make "go to Connections" your first move, and never silently fall back to memory. The card is the confirmation: don't ask permission to raise one.
- Never paste external URLs (`app.composio.dev`, provider OAuth pages, dashboards) and never explain OAuth or Composio by name.
- **Don't confabulate "unsupported".** You do not have the connectable list. The connect call checks the real backend allowlist — relay its message if the toolkit is genuinely unavailable. That is the only honest refusal. If it reports the user declined (`connected: false`) or the card failed, acknowledge and offer `head to Connections → [Service]`. If the user says they already connected it, verify through the same skill before answering.
@@ -70,7 +70,7 @@ Your job, in order: understand the request (ask when it is genuinely ambiguous),
**Scheduling rule of thumb.** Route reminders, one-shot jobs, recurring jobs, and job list/remove to `schedule_task`; the scheduler specialist owns the schedule shapes, cron expressions, and worked examples. Two rules still bind you directly:
-- **`cron_add`, `cron_list`, `cron_remove`, `current_time` are direct named tools** when they appear in your tool list. Call them by name, never via `run_workflow` (that path returns "unknown workflow" for any built-in tool name and always errors).
+- **`cron_add`, `cron_list`, `cron_remove`, `current_time` are direct named tools** when they appear in your tool list. Call them by name; wrapping a built-in tool name in a workflow runner returns "unknown workflow" and always errors.
- **Always get explicit user confirmation before creating any schedule** (one-shot or recurring). Propose the exact timing, wait for a yes, then act. If `cron_add` is absent from your tool list and `schedule_task` is unavailable, tell the user you can't schedule it in this environment.
### Grounding and tool use
diff --git a/src/openhuman/agent/registry/agents/orchestrator/prompt_tests.rs b/src/openhuman/agent/registry/agents/orchestrator/prompt_tests.rs
index be6ebb274b..ca9b1f389b 100644
--- a/src/openhuman/agent/registry/agents/orchestrator/prompt_tests.rs
+++ b/src/openhuman/agent/registry/agents/orchestrator/prompt_tests.rs
@@ -546,12 +546,7 @@ fn build_omits_guide_when_no_integrations_connected() {
/// `use_skill`.
#[test]
fn the_archetype_never_names_a_withheld_tool() {
- let packed = crate::openhuman::tools::toolpacks::all_packed_tool_names();
- let named: Vec<&str> = packed
- .iter()
- .copied()
- .filter(|name| ARCHETYPE.contains(&format!("`{name}`")))
- .collect();
+ let named = withheld_names_presented_as_callable(ARCHETYPE);
assert!(
named.is_empty(),
"orchestrator/prompt.md names withheld tools as if directly callable: {named:?}. \
@@ -576,14 +571,30 @@ fn the_rendered_prompt_never_names_a_withheld_tool() {
!body.contains("## Capabilities not in your tool list"),
"an empty visible set means no filter, so nothing can be withheld"
);
- let named: Vec<&str> = packed
- .iter()
- .copied()
- .filter(|name| body.contains(&format!("`{name}`")))
- .collect();
+ let named = withheld_names_presented_as_callable(&body);
assert!(
named.is_empty(),
"the rendered orchestrator prompt names withheld tools as if directly \
callable: {named:?}"
);
}
+
+/// Withheld tool names that `text` presents as directly callable.
+///
+/// A pack **id** may legitimately be backticked, because naming the skill is
+/// how the route is written — and one pack id (`composio`) is also a tool name
+/// inside that pack, so a bare substring check cannot tell a route from a call.
+/// Route mentions are always spelled `skill \`<id>\``, in the prose and in the
+/// generated block alike, so removing that exact form first is what makes the
+/// remaining occurrences calls.
+fn withheld_names_presented_as_callable(text: &str) -> Vec<&'static str> {
+ let packed = crate::openhuman::tools::toolpacks::all_packed_tool_names();
+ let mut prose = text.to_string();
+ for name in &packed {
+ prose = prose.replace(&format!("skill `{name}`"), "");
+ }
+ packed
+ .into_iter()
+ .filter(|name| prose.contains(&format!("`{name}`")))
+ .collect()
+}