The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(agent): remove unused orchestrator prompt tools
Steven Enamakel3e8d8e93d2a1
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs b/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rsindex 2ed455b980..12be5376a3 100644--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs@@ -403,15 +403,6 @@ fn master_agent_has_coding_hint_and_named_tools() {"orchestrator must have direct memory tool `{direct}` (#4762)");}- // Memory-protocol close-out (#4116): a direct `memory_store` write- // obliges an `update_memory_md` index reconcile, so the tool that- // performs it must be in scope — otherwise the protocol's guidance- // is unsatisfiable and MEMORY.md (loaded here) drifts from the store.- assert!(- tools.iter().any(|t| t == "update_memory_md"),- "orchestrator must have `update_memory_md` to reconcile MEMORY.md \- after a direct memory_store (#4762)"- );}ToolScope::Wildcard => panic!("orchestrator must have named tool allowlist"),}@@ -690,3 +681,26 @@ fn the_orchestrator_does_not_delegate_to_the_generalist_or_the_archivist() {);}}++#[test]+fn orchestrator_omits_removed_prompt_tools() {+ let orchestrator = find("orchestrator");+ let ToolScope::Named(tools) = &orchestrator.tools else {+ panic!("orchestrator must have a named tool scope");+ };+ for removed in ["request_plan_review", "plan_exit", "update_memory_md"] {+ assert!(+ !tools.iter().any(|tool| tool == removed),+ "`{removed}` must not appear in the orchestrator tool list"+ );+ }+ for removed in ["critic", "help"] {+ assert!(+ !orchestrator+ .subagents+ .iter()+ .any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == removed)),+ "`{removed}` adds a delegate tool to the orchestrator prompt"+ );+ }+}diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml b/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.tomlindex a043a1d7ff..2d1009182c 100644--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml@@ -134,10 +134,6 @@ allowlist = [# generation is async (minutes) and the agent blocks until the clip is saved."video_agent","skill_creator",- "critic",- # Product docs/help specialist. Route OpenHuman docs, settings,- # setup, and feature questions here before guessing from priors.- "help",# Scheduling/reminder specialist. Owns current_time + cron tools and# confirmation-before-create policy so the chat prompt does not carry# cron-specific instructions on every turn.@@ -278,21 +274,6 @@ named = [# domain gates both pass at runtime (the driver advertises `goals`), so# this list was the only closed layer (#5875 test session)."goals",- # Memory-protocol close-out (#4116). A successful `memory_store` is a durable- # write, so the memory-protocol middleware appends a "call `update_memory_md`- # to keep the MEMORY.md index in sync" note to the tool result and warns at run- # end if the index was never reconciled. Since the orchestrator now takes the- # direct-store path itself, it must own that closing step too — otherwise the- # guidance is unsatisfiable and MEMORY.md (which this agent loads,- # `omit_memory_md = false`) drifts from the store. `update_memory_md` is locked- # to the MEMORY.md / SKILL.md workspace index files (enum-gated, symlink-hardened),- # NOT a general file-editor: it is the index-sync counterpart of `memory_store`,- # so it belongs in the same memory bucket as the writes above — the "no write- # tools" rule (below) is about editing arbitrary files (`edit` / `file_write` /- # `apply_patch`) and running commands, which stay out. `save_preference` writes- # to the preference store and is deliberately NOT part of the MEMORY.md wiki, so- # it needs no reconcile.- "update_memory_md",# Managed file-storage transfer surface for passing artifacts/attachments# between chat, users, and workers. Storage lifecycle mutators# (`storage_set_visibility`, `storage_delete_file`) stay out of the broad@@ -380,19 +361,6 @@ named = [# == "todo"`; the legacy `todowrite` alias resolves to no registered# tool)."todo",- # `request_plan_review` / `plan_exit` — carried on the belt so both are- # reachable the instant a thread flips into Plan mode- # (`agent.set_run_mode` / a `chat:start`-time toggle / `plan_mode`- # middleware), but inert while the thread is in ordinary Build mode: a- # research or lookup question must never park the turn behind an- # approval card, and destructive actions are already gated by the- # shell/file approval layer. `RequestPlanReviewTool::execute_with_context`- # itself checks `agent::tinyagents::run_mode::get_mode` and no-ops- # outside Plan mode rather than parking, so simply holding the tool here- # does not change Build-mode behavior. Planner and cron agents also keep- # the plan-review tool for their own non-chat plan-approval paths.- "request_plan_review",- "plan_exit",# Thread-level goal (Codex-style per-thread completion contract). `goal_set`# records the durable objective for THIS thread when a non-trivial request# lands (the orchestrator is authoritative — it always creates or replaces);diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests_session_routing_tests.rs b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests_session_routing_tests.rsindex 3f9011dcf6..ef9ae8e17d 100644--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests_session_routing_tests.rs+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests_session_routing_tests.rs@@ -44,7 +44,7 @@ fn the_withheld_block_renders_for_a_renamed_session_with_a_filter() {// A visible set shaped like the live one: the advertised delegates are in,// the packed ones are not.- let visible: HashSet<String> = ["research", "plan", "ask_docs", "file_read", "goal_complete"]+ let visible: HashSet<String> = ["research", "plan", "file_read", "goal_complete"].iter().map(|s| s.to_string()).collect();diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rsindex 4fc630343b..625a47120e 100644--- a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs+++ b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs@@ -334,7 +334,15 @@ pub(super) fn assemble_turn_harness(// dedupe read or leaves the index stale. Pushed ahead of every other// result-rewriting middleware so its `after_tool` runs *after* the byte-cap// truncation, keeping the note.- harness.push_middleware(Arc::new(middleware::MemoryProtocolMiddleware::new()));+ // The closing-step reminder must only run when this agent can call the+ // index-update tool. Otherwise a direct memory write would instruct it to+ // call a tool that is absent from its turn.+ if allowed+ .as_ref()+ .is_none_or(|names| names.contains("update_memory_md"))+ {+ harness.push_middleware(Arc::new(middleware::MemoryProtocolMiddleware::new()));+ }// Repeated-failure circuit breaker: pause the run when a tool returns the same// error `REPEATED_TOOL_FAILURE_THRESHOLD` times in a row, so a deterministic