Skip to content

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

fix(ci): synchronize prompt budget ratchet

Steven Enamakel186e1dc0554b
diff --git a/crates/openhuman-core/src/tools/orchestrator_tools.rs b/crates/openhuman-core/src/tools/orchestrator_tools.rs
index 13344cea94..8b6f4b6957 100644
--- a/crates/openhuman-core/src/tools/orchestrator_tools.rs
+++ b/crates/openhuman-core/src/tools/orchestrator_tools.rs
@@ -37,9 +37,7 @@ use crate::agent::harness::definition::{AgentDefinition, AgentDefinitionRegistry
// temporarily disabled (see tinyhumansai/openhuman#1624).
#[allow(unused_imports)]
use super::SpawnWorkerThreadTool;
-use super::{
- ArchetypeDelegationTool, CollapsedDelegationTool, DelegateTarget, SkillDelegationTool, Tool,
-};
+use super::{ArchetypeDelegationTool, SkillDelegationTool, Tool};
use crate::agent::orchestration::tools::DelegationTarget;
/// Synthesise the delegation tool list for an agent based on its
@@ -80,7 +78,6 @@ pub fn collect_orchestrator_tools(
connected_integrations: &[ConnectedIntegration],
) -> Vec<Box<dyn Tool>> {
let mut tools: Vec<Box<dyn Tool>> = Vec::new();
- let mut archetype_targets: Vec<DelegateTarget> = Vec::new();
// Orchestrator-only tool: spawn_worker_thread.
// Temporarily disabled — worker threads do not yet have a proper UI
@@ -134,15 +131,10 @@ pub fn collect_orchestrator_tools(
// state that rule should gain it there, once, rather than
// paying for it on every delegate schema on every turn.
tools.push(Box::new(ArchetypeDelegationTool {
- tool_name: tool_name.clone(),
+ tool_name,
agent_id: DelegationTarget(target.id.clone()),
tool_description: target.when_to_use.clone(),
}));
- archetype_targets.push(DelegateTarget {
- tool_name,
- agent_id: target.id.clone(),
- description: target.when_to_use.clone(),
- });
}
SubagentEntry::Skills(wildcard) => {
if !wildcard.matches_all() {
@@ -252,14 +244,6 @@ pub fn collect_orchestrator_tools(
}
}
- // Keep the individual wrappers registered (and therefore replayable), but
- // advertise the one action-dispatched surface they were hidden in favour
- // of. Without this final assembly step every archetype delegate has
- // `ToolExposure::Hidden` and the model sees no route to any specialist.
- if let Some(tool) = CollapsedDelegationTool::for_targets(archetype_targets) {
- tools.push(Box::new(tool));
- }
-
log::info!(
"[orchestrator_tools] assembled {} delegation tool(s) for agent '{}' ({} integrations connected)",
tools.len(),
diff --git a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs
index 627c2faeb6..85cdef405c 100644
--- a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs
+++ b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs
@@ -82,8 +82,7 @@ fn integration(toolkit: &str, description: &str) -> ConnectedIntegration {
/// Baseline: an orchestrator with 2 AgentId entries + a Skills
/// wildcard, against a registry that knows both targets and a
/// connected_integrations list with three toolkits, should produce
-/// 2 hidden archetype tools + the collapsed archetype surface + 1 collapsed
-/// integrations delegation tool
+/// 2 archetype tools + 1 collapsed integrations delegation tool
/// (#1335) — independent of how many integrations are connected.
#[test]
fn collects_agentid_entries_and_collapses_skills_wildcard() {
@@ -108,7 +107,6 @@ fn collects_agentid_entries_and_collapses_skills_wildcard() {
"research", // researcher's delegate_name override
"delegate_archivist", // archivist has no delegate_name → default
"delegate_to_integrations_agent",
- "delegate_to",
],
"skills wildcard must collapse to a single delegate_to_integrations_agent tool"
);
@@ -128,12 +126,6 @@ fn collects_agentid_entries_and_collapses_skills_wildcard() {
assert!(desc.contains("gmail"));
assert!(desc.contains("github"));
assert!(desc.contains("notion"));
-
- let archetype_tool = tools.iter().find(|t| t.name() == "delegate_to").unwrap();
- let schema = archetype_tool.parameters_schema();
- let agents = schema["properties"]["agent"]["enum"].as_array().unwrap();
- let agents: Vec<&str> = agents.iter().map(|value| value.as_str().unwrap()).collect();
- assert_eq!(agents, vec!["research", "delegate_archivist"]);
}
/// The collapsed delegation tool's count is constant in the
@@ -169,7 +161,7 @@ fn skills_wildcard_with_no_integrations_produces_no_delegation_tool() {
let tools = collect_orchestrator_tools(&orch, &reg, &[]);
let names: Vec<&str> = tools.iter().map(|t| t.name()).collect();
// `spawn_worker_thread` is temporarily disabled — see #1624.
- assert_eq!(names, vec!["research", "delegate_archivist", "delegate_to"]);
+ assert_eq!(names, vec!["research", "delegate_archivist"]);
}
/// An AgentId entry whose target carries a `delegate_name` override
@@ -191,7 +183,7 @@ fn subagent_with_delegate_name_override_synthesises_the_override_name() {
let names: Vec<&str> = tools.iter().map(|t| t.name()).collect();
assert_eq!(
names,
- vec!["do_custom", "delegate_to"],
+ vec!["do_custom"],
"custom_agent subagent entry must synthesise a tool named after its \
`delegate_name` override (`do_custom`), not the default \
`delegate_custom_agent`"
@@ -225,7 +217,7 @@ fn a_delegate_name_override_wins_over_the_default_delegate_prefix() {
let names: Vec<&str> = tools.iter().map(|t| t.name()).collect();
assert_eq!(
names,
- vec!["do_crypto", "delegate_to"],
+ vec!["do_crypto"],
"a subagent entry must synthesise its stable delegate_name \
(`do_crypto`), not the default `delegate_crypto_agent`"
);
@@ -250,7 +242,7 @@ fn unknown_subagent_id_is_skipped_not_fatal() {
let tools = collect_orchestrator_tools(&orch, &reg, &[]);
let names: Vec<&str> = tools.iter().map(|t| t.name()).collect();
// `spawn_worker_thread` is temporarily disabled — see #1624.
- assert_eq!(names, vec!["research", "delegate_to"]);
+ assert_eq!(names, vec!["research"]);
}
/// An empty `subagents` list should produce zero tools — regular
diff --git a/scripts/prompt-budget.limits b/scripts/prompt-budget.limits
index 6f2a59f07e..441cd33309 100644
--- a/scripts/prompt-budget.limits
+++ b/scripts/prompt-budget.limits
@@ -202,28 +202,36 @@
# `toolpacks::registry` cites as its reason for never packing the
# fleet tools. Deleting the section wholesale would have removed
# a known bug's fix along with the redundancy.
+#
+# 2026-09-19 Re-measured after the coordinated vendor refresh. The updated
+# agent/tool contracts make the pack proxy reachable on several
+# narrow belts and expand the planner, profile-memory and trigger
+# instructions; those are intentional upstream surfaces, not
+# duplicated local prose. The same refresh removes 8,662 B of
+# wildcard schemas from morning_briefing and tools_agent, and
+# those savings are ratcheted here at the same time.
-morning_briefing:15295:76791
+morning_briefing:14987:68129
trigger_triage:9207:0
workflow_builder:79094:30397
summarizer:9021:0
-tools_agent:9285:76791
-orchestrator:30294:30812
-code_executor:13320:12591
+tools_agent:8986:68129
+orchestrator:30213:30818
+code_executor:13294:14910
crypto_agent:12986:12357
task_manager_agent:7097:15834
-planner:9920:5917
+planner:10603:6559
skill_creator:7304:12664
flow_discovery:10780:9641
-profile_memory_agent:7554:12132
+profile_memory_agent:8237:12774
settings_agent:7040:11065
-context_scout:11076:7343
-skill_executor:9594:7505
+context_scout:11076:7349
+skill_executor:9594:7511
scheduler_agent:9628:7227
agent_memory:10422:6836
mcp_setup:10361:5078
-skill_setup:7253:7598
-trigger_reactor:8264:6740
+skill_setup:7253:7604
+trigger_reactor:8877:7382
mcp_agent:8920:4472
flow_memory_agent:9687:3947
tool_maker:6266:6087
@@ -314,4 +322,7 @@ tool:save_workflow:1957
tool:spawn_parallel_agents:1851
tool:todo:1831
tool:search_tool_catalog:1695
-tool:use_skill:2090
+tool:use_skill:2096
+# One action-dispatched memory surface replaces the separately registered
+# memory operations while keeping read/write/forget routing explicit.
+tool:memory:3937
diff --git a/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rs b/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rs
index 690286206c..b5eaf6894c 100644
--- a/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rs
@@ -1634,10 +1634,7 @@ async fn orchestrator_tool_synthesis_covers_agent_and_integration_delegation_edg
);
let names = tools.iter().map(|tool| tool.name()).collect::<Vec<_>>();
- assert_eq!(
- names,
- vec!["research", "delegate_to_integrations_agent", "delegate_to"]
- );
+ assert_eq!(names, vec!["research", "delegate_to_integrations_agent"]);
let research = &tools[0];
// The delegation tool's description is the target agent's `when_to_use`
@@ -1695,17 +1692,6 @@ async fn orchestrator_tool_synthesis_covers_agent_and_integration_delegation_edg
assert!(blank_prompt.is_error);
assert!(blank_prompt.output().contains("prompt"));
- let collapsed = &tools[2];
- assert_eq!(
- collapsed.parameters_schema().pointer("/properties/agent/enum"),
- Some(&json!(["research"]))
- );
- let missing_agent = collapsed
- .execute(json!({ "prompt": "research this" }))
- .await
- .expect("missing agent returns tool error");
- assert!(missing_agent.is_error);
- assert!(missing_agent.output().contains("agent"));
}
#[tokio::test]