Skip to content

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

refactor(core): replace `anyhow` with `thiserror` across agent and orchestration modules

Steven Enamakel3d2ce1dfbf24
diff --git a/crates/openhuman-core/src/agent/harness/agent_graph.rs b/crates/openhuman-core/src/agent/harness/agent_graph.rs
index 48782be6fe..d5dc19afb1 100644
--- a/crates/openhuman-core/src/agent/harness/agent_graph.rs
+++ b/crates/openhuman-core/src/agent/harness/agent_graph.rs
@@ -13,7 +13,7 @@
//! `run_turn_via_tinyagents_shared`.
//!
//! Today every built-in agent selects `Default`. The optional hook is the
-//! extension point that lets a specialized agent (orchestrator, researcher, …)
+//! extension point that lets a specialized agent (orchestrator, planner, …)
//! define a bespoke graph without branching the shared runner.
use std::collections::HashSet;
diff --git a/crates/openhuman-core/src/agent/harness/artifact_offload/contract.rs b/crates/openhuman-core/src/agent/harness/artifact_offload/contract.rs
index 137b315a51..e856edd6ff 100644
--- a/crates/openhuman-core/src/agent/harness/artifact_offload/contract.rs
+++ b/crates/openhuman-core/src/agent/harness/artifact_offload/contract.rs
@@ -20,11 +20,10 @@ pub const ARTIFACT_OFFLOAD_HEADING: &str = "## Long-horizon Artifact Offload";
/// Tool a sub-agent must actually hold before the contract is worth rendering.
///
/// A prompt may only name tools the agent can really call: advertising one it
-/// lacks produces hallucinated calls that fail. `researcher` (search + fetch
-/// only) and every skill-filtered specialist have no filesystem tools, and
-/// dedicated guards assert their prompts never mention one — see
-/// `agent_registry::agents::researcher::prompt::tests::build_returns_nonempty_body`
-/// and `subagent_host::ops_tests::typed_mode_filters_tools_by_skill_filter`.
+/// lacks produces hallucinated calls that fail. Every skill-filtered specialist
+/// has no filesystem tools, and a dedicated guard asserts its prompt never
+/// mentions one — see
+/// `subagent_host::ops_tests::typed_mode_filters_tools_by_skill_filter`.
pub const OFFLOAD_WRITE_TOOL: &str = "file_write";
/// Whether the offload contract should be rendered for an agent whose visible
diff --git a/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs b/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs
index 8985cb991c..d358074acb 100644
--- a/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs
+++ b/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs
@@ -64,7 +64,7 @@ pub enum TriggerMemoryAgent {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AgentDefinition {
// ── identity ────────────────────────────────────────────────────────
- /// Unique identifier for this archetype (e.g., `researcher`, `code_executor`).
+ /// Unique identifier for this archetype (e.g., `planner`, `code_executor`).
pub id: String,
/// Human-readable description explaining when this agent should be used.
diff --git a/crates/openhuman-core/src/agent/harness/definition/subagents.rs b/crates/openhuman-core/src/agent/harness/definition/subagents.rs
index bfbb0ed7c8..7ad2c05cdd 100644
--- a/crates/openhuman-core/src/agent/harness/definition/subagents.rs
+++ b/crates/openhuman-core/src/agent/harness/definition/subagents.rs
@@ -12,7 +12,7 @@ use serde::{Deserialize, Deserializer, Serialize};
/// ```toml
/// [subagents]
/// allowlist = [
-/// "researcher", # AgentId("researcher")
+/// "planner", # AgentId("planner")
/// "code_executor", # AgentId("code_executor")
/// { skills = "*" }, # Skills { pattern: "*" }
/// ]
diff --git a/crates/openhuman-core/src/agent/harness/definition/tier.rs b/crates/openhuman-core/src/agent/harness/definition/tier.rs
index 9cdf67cb79..cfb9d267ad 100644
--- a/crates/openhuman-core/src/agent/harness/definition/tier.rs
+++ b/crates/openhuman-core/src/agent/harness/definition/tier.rs
@@ -31,7 +31,7 @@ pub enum AgentTier {
/// to one or more `Worker`s. Must NOT delegate to another
/// `Reasoning` agent.
Reasoning,
- /// Leaf executor — researchers, code executors, critics, archivists,
+ /// Leaf executor — code executors, critics, archivists,
/// integration specialists, etc. Workers do the actual work and must
/// NOT spawn further subagents (a `Worker` with a non-empty
/// `subagents` list is rejected by the loader).
diff --git a/crates/openhuman-core/src/agent/harness/mod.rs b/crates/openhuman-core/src/agent/harness/mod.rs
index e794f2557c..8872ce0f0f 100644
--- a/crates/openhuman-core/src/agent/harness/mod.rs
+++ b/crates/openhuman-core/src/agent/harness/mod.rs
@@ -5,7 +5,7 @@
//! including prompt construction, tool filtering, and result synthesis.
//!
//! ## Delegation via `spawn_subagent`
-//! The system treats specialized agents (researchers, planners, etc.) as tools.
+//! The system treats specialized agents (planners, code executors, etc.) as tools.
//! An agent can invoke the `spawn_subagent` tool, which looks up a definition
//! in the global [`AgentDefinitionRegistry`] and runs a dedicated tool loop.
//!
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
index d14a7a2645..9042cb12c4 100644
--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
@@ -50,7 +50,7 @@ use crate::agent::tinyagents::observability::GraphTracingSink;
const LOG_TARGET: &str = "agent_team_runtime";
/// Fallback worker archetype when a member carries no explicit `agent_id`.
-const DEFAULT_TEAMMATE_AGENT_ID: &str = "researcher";
+const DEFAULT_TEAMMATE_AGENT_ID: &str = "tools_agent";
/// Event recorded when a worker run ends without completing its task.
const MEMBER_FAILED_EVENT: &str = "team_member_failed";
/// Cap on how much worker output is captured as evidence (UTF-8 safe).
diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
index 92f0b1e0bb..5bdd0627a1 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
@@ -32,7 +32,7 @@ pub(crate) enum BackgroundAgentOutcome {
pub(crate) struct CompletedBackgroundAgent {
/// Spawn process id (`sub-…`) — the tag the agent uses to reference it.
pub(crate) task_id: String,
- /// Sub-agent definition id (e.g. `researcher`).
+ /// Sub-agent definition id (e.g. `code_executor`).
pub(crate) agent_id: String,
/// The sub-agent's final output / summary.
pub(crate) summary: String,
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs
index 80da467719..8d094a0356 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs
@@ -9,7 +9,7 @@ use crate::agent::orchestration::fleet_tools::FleetToolSet;
/// into a parent's turn context (see [`active_subagents_context_block`]).
#[derive(Debug, Clone)]
pub(crate) struct SubagentSnapshot {
- /// Worker *type* (e.g. `researcher`). Not unique — two parallel researchers
+ /// Worker *type* (e.g. `code_executor`). Not unique — two parallel workers
/// share this; disambiguate on `subagent_session_id` / `task_id`.
pub(crate) agent_id: String,
/// Durable, stable per-worker reference the prompt steers/waits/closes by.
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs b/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs
index 2c5e44f02f..0208746795 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs
@@ -118,7 +118,7 @@ impl Tool for DelegateGraphTool {
let agent_id_schema = if agent_ids.is_empty() {
json!({
"type": "string",
- "description": "Sub-agent id (e.g. code_executor, researcher, critic)."
+ "description": "Sub-agent id (e.g. code_executor, planner, critic)."
})
} else {
json!({
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
index 45e74bd4d6..bb225b3386 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
@@ -146,7 +146,7 @@ impl Tool for SpawnAsyncSubagentTool {
let agent_id_schema = if agent_ids.is_empty() {
json!({
"type": "string",
- "description": "Sub-agent id (e.g. archivist, researcher, tools_agent)."
+ "description": "Sub-agent id (e.g. archivist, planner, tools_agent)."
})
} else {
json!({
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs
index aeca8db2fe..6900f7865b 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs
@@ -23,7 +23,7 @@ fn spawn_subagent_parameters_schema() -> serde_json::Value {
let agent_id_schema = if agent_ids.is_empty() {
json!({
"type": "string",
- "description": "Sub-agent id (e.g. code_executor, researcher, critic)."
+ "description": "Sub-agent id (e.g. code_executor, planner, critic)."
})
} else {
json!({
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
index 32a78442bb..e783bd7488 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
@@ -95,7 +95,7 @@ impl Tool for SpawnWorkerThreadTool {
let agent_id_schema = if agent_ids.is_empty() {
json!({
"type": "string",
- "description": "Sub-agent id (e.g. code_executor, researcher, planner)."
+ "description": "Sub-agent id (e.g. code_executor, critic, planner)."
})
} else {
json!({
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs
index 627db19cd8..fa4bdb505b 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/ops.rs
@@ -31,7 +31,7 @@ pub fn builtin_definitions() -> Vec<WorkflowDefinition> {
description: "Decompose a question into angles, research them in parallel, cross-check the claims with a critic, then synthesize a cited report. Read-only.".to_owned(),
phases: vec![
WorkflowPhase { name: "decompose".into(), description: "Break the question into independent research angles.".into(), agent_ids: vec!["planner".into()], depends_on: vec![] },
- WorkflowPhase { name: "research".into(), description: "Research each angle in parallel.".into(), agent_ids: vec!["researcher".into(), "researcher".into()], depends_on: vec!["decompose".into()] },
+ WorkflowPhase { name: "research".into(), description: "Research each angle in parallel.".into(), agent_ids: vec!["context_scout".into(), "context_scout".into()], depends_on: vec!["decompose".into()] },
WorkflowPhase { name: "cross_check".into(), description: "Adversarially cross-check the gathered claims.".into(), agent_ids: vec!["critic".into()], depends_on: vec!["research".into()] },
WorkflowPhase { name: "synthesize".into(), description: "Synthesize a single cited report.".into(), agent_ids: vec!["summarizer".into()], depends_on: vec!["cross_check".into()] },
],
diff --git a/crates/openhuman-core/src/agent/progress.rs b/crates/openhuman-core/src/agent/progress.rs
index 054e363727..9965783767 100644
--- a/crates/openhuman-core/src/agent/progress.rs
+++ b/crates/openhuman-core/src/agent/progress.rs
@@ -137,7 +137,7 @@ pub enum AgentProgress {
elapsed_ms: u64,
/// Number of LLM iterations the sub-agent actually used. The
/// UI surfaces this in the parent thread's subagent row so a
- /// completed delegation reads as "researcher · 3 turns · 4.2s"
+ /// completed delegation reads as "code_executor · 3 turns · 4.2s"
/// instead of just "done".
iterations: u32,
/// Character length of the sub-agent's final assistant text.
diff --git a/crates/openhuman-core/src/agent/progress_tracing.rs b/crates/openhuman-core/src/agent/progress_tracing.rs
index 298794c1fe..d2f141d31f 100644
--- a/crates/openhuman-core/src/agent/progress_tracing.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing.rs
@@ -10,7 +10,7 @@
//! agent.turn (root, trace_id = session id)
//! ├─ agent.iteration #1
//! │ ├─ tool.web_search
-//! │ └─ subagent.researcher
+//! │ └─ subagent.code_executor
//! │ ├─ subagent.iteration #1
//! │ │ └─ tool.read_file
//! │ └─ (closed on SubagentCompleted)
diff --git a/crates/openhuman-core/src/agent/progress_tracing/types.rs b/crates/openhuman-core/src/agent/progress_tracing/types.rs
index 1a082b006c..798fb21fb9 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/types.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/types.rs
@@ -65,7 +65,7 @@ pub struct TraceContext {
/// stays inspectable without polluting user attribution.
pub client_id: Option<String>,
/// Agent definition id driving the turn (e.g. `"orchestrator"`,
- /// `"researcher"`). Stamped as the `agent.id` attribute and folded into
+ /// `"code_executor"`). Stamped as the `agent.id` attribute and folded into
/// the root span/trace name (`agent.turn:<agent_id>`).
pub agent_id: Option<String>,
/// Where the run originated (`"chat"`, `"ptt"`, `"autonomous"`, …).
diff --git a/crates/openhuman-core/src/agent/prompts/sections.rs b/crates/openhuman-core/src/agent/prompts/sections.rs
index 9495fbaefc..7950051150 100644
--- a/crates/openhuman-core/src/agent/prompts/sections.rs
+++ b/crates/openhuman-core/src/agent/prompts/sections.rs
@@ -448,7 +448,7 @@ impl PromptSection for SafetySection {
/// anti-fabrication rules every agent inherits. Before this block existed,
/// the same "never invent ids / a tool not in your list does not exist"
/// paragraph was copy-pasted (and slowly drifting) across crypto, markets,
-/// integrations, account-admin, mcp-setup, morning-briefing, researcher, …
+/// integrations, account-admin, mcp-setup, morning-briefing, …
/// agent prompts. Centralising it kills that drift and guarantees a uniform
/// floor of grounding discipline.
///
diff --git a/crates/openhuman-core/src/agent/session_host/builder/mod.rs b/crates/openhuman-core/src/agent/session_host/builder/mod.rs
index fa09861ce1..5ef8af2a48 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/mod.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/mod.rs
@@ -30,8 +30,8 @@ use tinytools::{Tool, ToolSpec};
/// Anthropic (and other strict providers) rejects a chat/completions
/// request that lists two tools with the same name — OpenHuman's own
/// backend and OpenAI silently accept duplicates, which hid the
-/// underlying collision (researcher sub-agent's `delegate_name =
-/// "research"` shadowing a same-named skill tool) until #1710's
+/// underlying collision (a sub-agent's `delegate_name` shadowing a
+/// same-named skill tool) until #1710's
/// per-role routing started sending the same tool list to Anthropic.
///
/// Called from every place that materialises the visible tool spec
diff --git a/crates/openhuman-core/src/agent/session_host/turn/tools.rs b/crates/openhuman-core/src/agent/session_host/turn/tools.rs
index 62f8390b55..727450d9eb 100644
--- a/crates/openhuman-core/src/agent/session_host/turn/tools.rs
+++ b/crates/openhuman-core/src/agent/session_host/turn/tools.rs
@@ -638,7 +638,7 @@ impl OpenHumanSessionHost {
// Rebuild the visible-spec cache from the new tool_specs so the
// next provider call carries the reconciled schema. Dedup
// afterward so a delegate synthesised here (e.g.
- // `delegate_name = "research"`) doesn't collide with a
+ // `delegate_name = "plan"`) doesn't collide with a
// same-named skill tool on the wire — Anthropic 400s on dup
// tool names where OpenHuman's backend silently accepts.
self.rebuild_tool_policy_session();
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs b/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs
index 849fd7f84c..9f6748a2cc 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs
@@ -85,11 +85,9 @@ pub(crate) fn append_subagent_role_contract(base_prompt: String, agent_id: &str)
///
/// Kept separate from [`append_subagent_role_contract`] because it is **not**
/// universal. A sub-agent's system prompt may only name tools it can really
-/// call — `researcher` is search + fetch only, and a skill-filtered specialist
-/// sees just its own toolkit. Telling either to write a file yields
+/// call — a skill-filtered specialist sees just its own toolkit. Telling it to write a file yields
/// hallucinated calls that fail, and two guards enforce it
-/// (`researcher::prompt::tests::build_returns_nonempty_body`,
-/// `ops_tests::typed_mode_filters_tools_by_skill_filter`).
+/// (`ops_tests::typed_mode_filters_tools_by_skill_filter`).
///
/// Agents skipped here are still covered: `offload_oversized_result` runs on
/// every sub-agent outcome and needs no cooperation from the model.
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
index c19bad6e19..66b500dc92 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
@@ -387,7 +387,7 @@ pub(crate) async fn run_subagent_direct(
// state) onto tokio's 2 MiB worker stack and abort with "thread
// 'tokio-rt-worker' has overflowed its stack, fatal runtime error:
// stack overflow" — observed at `[subagent_host] dispatching
- // agent_id=researcher ...` in the `chat-harness-subagent` Playwright
+ // agent_id=<worker> ...` in the `chat-harness-subagent` Playwright
// lane crash. The inner `Box::pin`s around `run_typed_mode` and the
// child's tinyagents drive future further chunk the child's state so
// a single sub-agent run can't blow the stack either.
diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
index 71201c248b..819ccbc7f9 100644
--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
@@ -224,7 +224,7 @@ pub(crate) fn subagent_prompt_protocol(
/// * the generic `spawn_subagent` meta-tool (arbitrary archetype by id);
/// * every synthesised per-archetype `delegate_*` tool
/// ([`crate::tools::orchestrator_tools::collect_orchestrator_tools`]
-/// emits `delegate_researcher`, `delegate_planner`, …).
+/// emits `delegate_code_executor`, `delegate_planner`, …).
/// * `agent_prepare_context` — the context-scout entry point. It reads the
/// *parent's* visible catalog/session via `current_parent()`, which inside a
/// nested run is still the top-level orchestrator (the runner does not
@@ -384,7 +384,7 @@ pub(super) fn load_prompt_source(
// file write — so we re-use that scaffolding by reading from
// `<workspace>/<filename>` after the parent agent has
// bootstrapped its workspace files. For sub-agent
- // archetype prompts (e.g. `archetypes/researcher.md`),
+ // archetype prompts (e.g. `archetypes/critic.md`),
// we look up by basename in the workspace, then accept
// missing files as an empty body (the runner will fall
// back to a generic role hint).
diff --git a/crates/openhuman-core/src/agent/subagent_host/types.rs b/crates/openhuman-core/src/agent/subagent_host/types.rs
index 9dfe3b948b..0e703b4e58 100644
--- a/crates/openhuman-core/src/agent/subagent_host/types.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/types.rs
@@ -149,7 +149,7 @@ pub enum SubagentRunStatus {
pub struct SubagentRunOutcome {
/// Unique identifier for this sub-task run.
pub task_id: String,
- /// The ID of the agent archetype used (e.g., `researcher`).
+ /// The ID of the agent archetype used (e.g., `code_executor`).
pub agent_id: String,
/// The final text response produced by the sub-agent.
pub output: String,
diff --git a/crates/openhuman-core/src/config/schema/types/resolvers.rs b/crates/openhuman-core/src/config/schema/types/resolvers.rs
index fb2dd33177..e91a5ea848 100644
--- a/crates/openhuman-core/src/config/schema/types/resolvers.rs
+++ b/crates/openhuman-core/src/config/schema/types/resolvers.rs
@@ -76,8 +76,8 @@ impl Config {
/// 1. `orchestrator.model` when resolving the front-line orchestrator.
/// 2. `[teams.<agent_id>]` entries, with `lead_model` used for agents
/// that can delegate and `agent_model` used for leaf workers.
- /// 3. Built-in aliases such as `[teams.research]` for `researcher` and
- /// `[teams.code]` for `code_executor`, matching the issue examples.
+ /// 3. Built-in aliases such as `[teams.code]` for `code_executor` and
+ /// `[teams.tools]` for `tools_agent`, matching the issue examples.
///
/// Empty strings are ignored so partially-written configs fall back to
/// the existing auto-routing path.
@@ -116,7 +116,6 @@ impl Config {
}
let aliases: &[&str] = match agent_id {
- "researcher" => &["research"],
"code_executor" => &["code"],
"tool_maker" | "tools_agent" => &["tools"],
"integrations_agent" => &["integrations"],
diff --git a/crates/openhuman-core/src/core/events.rs b/crates/openhuman-core/src/core/events.rs
index de34f5b5be..03435bf32d 100644
--- a/crates/openhuman-core/src/core/events.rs
+++ b/crates/openhuman-core/src/core/events.rs
@@ -61,7 +61,7 @@ pub enum DomainEvent {
SubagentSpawned {
/// Parent agent's session id.
parent_session: String,
- /// Sub-agent definition id (e.g. `researcher`, `notion_specialist`, `fork`).
+ /// Sub-agent definition id (e.g. `code_executor`, `notion_specialist`, `fork`).
agent_id: String,
/// Spawn mode — `"typed"` or `"fork"`.
mode: String,
diff --git a/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs b/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs
index b8868c8bcf..aa30ee6123 100644
--- a/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs
+++ b/crates/openhuman-core/src/flows/builder_tools/kind_reads.rs
@@ -10,7 +10,7 @@ use tinytools::{PermissionLevel, Tool, ToolResult};
// ─────────────────────────────────────────────────────────────────────────────
/// `list_agent_definitions`: read-only listing of the agent **definitions** an `agent`
-/// node can select via `agent_ref` (researcher, code_executor, crypto_agent, …).
+/// node can select via `agent_ref` (code_executor, critic, crypto_agent, …).
///
/// Grounds the builder's `agent_ref` choice in real registry ids — the agent
/// analogue of `search_tool_catalog` for `tool_call` slugs — so it never
diff --git a/crates/openhuman-core/src/mcp/server/resources.rs b/crates/openhuman-core/src/mcp/server/resources.rs
index a364806a7f..fa7ace51a0 100644
--- a/crates/openhuman-core/src/mcp/server/resources.rs
+++ b/crates/openhuman-core/src/mcp/server/resources.rs
@@ -97,12 +97,6 @@ const RESOURCE_CATALOG: &[PromptResource] = &[
description: "Sandboxed worker that authors and publishes skill packages.",
content: include_str!("../../agent/registry/agents/skill_creator/prompt.md"),
},
- PromptResource {
- uri: "openhuman://prompts/agents/researcher",
- name: "researcher",
- description: "Worker that searches the web and synthesises research findings.",
- content: include_str!("../../agent/registry/agents/researcher/prompt.md"),
- },
PromptResource {
uri: "openhuman://prompts/agents/context_scout",
name: "context_scout",
diff --git a/crates/openhuman-core/src/mcp/server/tools/specs.rs b/crates/openhuman-core/src/mcp/server/tools/specs.rs
index a266b9847a..1f359371c2 100644
--- a/crates/openhuman-core/src/mcp/server/tools/specs.rs
+++ b/crates/openhuman-core/src/mcp/server/tools/specs.rs
@@ -96,7 +96,7 @@ pub fn base_tool_specs() -> Vec<McpToolSpec> {
"properties": {
"agent_id": {
"type": "string",
- "description": "Registered sub-agent id (for example `researcher`, `planner`, `code_executor`)."
+ "description": "Registered sub-agent id (for example `planner`, `code_executor`, `critic`)."
},
"prompt": {
"type": "string",
diff --git a/crates/openhuman-core/src/threads/transcript_view/subagents.rs b/crates/openhuman-core/src/threads/transcript_view/subagents.rs
index dd11ac1a59..df5656537a 100644
--- a/crates/openhuman-core/src/threads/transcript_view/subagents.rs
+++ b/crates/openhuman-core/src/threads/transcript_view/subagents.rs
@@ -376,7 +376,7 @@ fn call_targets_agent(name: &str, args: Option<&serde_json::Value>, agent_id: &s
if named_in_args {
return true;
}
- // Alias tools such as `research` → `researcher`. The length floor keeps a
+ // Alias tools such as `plan` → `planner`. The length floor keeps a
// short generic tool name from matching an agent by accident.
let stripped = name
.strip_prefix("delegate_to_")
diff --git a/crates/openhuman-core/src/threads/transcript_view/types.rs b/crates/openhuman-core/src/threads/transcript_view/types.rs
index ebb215ae69..fd1322f7b7 100644
--- a/crates/openhuman-core/src/threads/transcript_view/types.rs
+++ b/crates/openhuman-core/src/threads/transcript_view/types.rs
@@ -136,7 +136,7 @@ pub enum DisplayItem {
/// file-stem suffix — never the agent name, which repeats across runs.
Subagent {
id: String,
- /// Sub-agent definition id (e.g. `researcher`).
+ /// Sub-agent definition id (e.g. `code_executor`).
#[serde(skip_serializing_if = "Option::is_none")]
agent_id: Option<String>,
/// Spawn task id (`sub-…`), when the transcript recorded one.
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index bdd56c5b22..65dd2c56c9 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -328,7 +328,7 @@ pub fn all_tools_with_runtime(
#[cfg(feature = "flows")]
Box::new(GetToolOutputSampleTool::new(config.clone())),
// Ground an `agent` node's `agent_ref` in real registered agent-kind ids
- // (researcher / code_executor / …) — the agent analogue of
+ // (code_executor / critic / …) — the agent analogue of
// search_tool_catalog. Read-only.
#[cfg(feature = "flows")]
Box::new(ListAgentDefinitionsTool::new()),