Skip to content

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

fix(agent): restore packed scheduler delegation

Steven Enamakel300807f5ffa3
diff --git a/app/test/playwright/specs/harness-channel-bridge-flow.spec.ts b/app/test/playwright/specs/harness-channel-bridge-flow.spec.ts
index 66fb5f9c69..fbfe2415cc 100644
--- a/app/test/playwright/specs/harness-channel-bridge-flow.spec.ts
+++ b/app/test/playwright/specs/harness-channel-bridge-flow.spec.ts
@@ -119,21 +119,36 @@ test.describe('Harness - Cross-channel bridge flow', () => {
await setMockBehavior(
'llmForcedResponses',
JSON.stringify([
+ {
+ content: '',
+ toolCalls: [
+ {
+ id: 'call_schedule_task_cb1',
+ name: 'schedule_task',
+ arguments: JSON.stringify({
+ prompt: 'Create a daily 9am standup reminder.',
+ blocking: true,
+ }),
+ },
+ ],
+ },
{
content: '',
toolCalls: [
{
id: 'call_cron_add_cb1',
- name: 'cron_add',
+ name: 'cron',
arguments: JSON.stringify({
+ action: 'add',
name: 'daily_standup_reminder',
- schedule: '0 9 * * *',
+ schedule: { kind: 'cron', expr: '0 9 * * *' },
prompt: 'standup reminder',
enabled: true,
}),
},
],
},
+ { content: 'The daily standup reminder is scheduled.' },
{ content: `I created a daily 9am standup reminder for you. ${CANARY}` },
])
);
diff --git a/app/test/playwright/specs/harness-cron-prompt-flow.spec.ts b/app/test/playwright/specs/harness-cron-prompt-flow.spec.ts
index c26cfc7d71..7f37e1fa81 100644
--- a/app/test/playwright/specs/harness-cron-prompt-flow.spec.ts
+++ b/app/test/playwright/specs/harness-cron-prompt-flow.spec.ts
@@ -129,21 +129,36 @@ test.describe('Harness - Cron prompt-flow', () => {
await setMockBehavior(
'llmForcedResponses',
JSON.stringify([
+ {
+ content: '',
+ toolCalls: [
+ {
+ id: 'call_schedule_task_add_1',
+ name: 'schedule_task',
+ arguments: JSON.stringify({
+ prompt: 'Create a daily 9am morning reminder.',
+ blocking: true,
+ }),
+ },
+ ],
+ },
{
content: '',
toolCalls: [
{
id: 'call_cron_add_1',
- name: 'cron_add',
+ name: 'cron',
arguments: JSON.stringify({
+ action: 'add',
name: 'morning_reminder',
- schedule: '0 9 * * *',
+ schedule: { kind: 'cron', expr: '0 9 * * *' },
prompt: 'morning reminder',
enabled: true,
}),
},
],
},
+ { content: 'The morning reminder is scheduled.' },
{ content: `Done! I have set up a daily 9am morning reminder for you. ${CANARY}` },
])
);
@@ -184,19 +199,34 @@ test.describe('Harness - Cron prompt-flow', () => {
await setMockBehavior(
'llmForcedResponses',
JSON.stringify([
+ {
+ content: '',
+ toolCalls: [
+ {
+ id: 'call_schedule_task_update_1',
+ name: 'schedule_task',
+ arguments: JSON.stringify({
+ prompt: 'Change the morning reminder to 8am.',
+ blocking: true,
+ }),
+ },
+ ],
+ },
{
content: '',
toolCalls: [
{
id: 'call_cron_update_1',
- name: 'cron_update',
+ name: 'cron',
arguments: JSON.stringify({
- id: 'morning_reminder_update_test',
- schedule: '0 8 * * *',
+ action: 'update',
+ job_id: 'morning_reminder_update_test',
+ patch: { schedule: { kind: 'cron', expr: '0 8 * * *' } },
}),
},
],
},
+ { content: 'The morning reminder schedule is updated.' },
{ content: `Done! I have changed your morning reminder to 8am. ${CANARY}` },
])
);
@@ -213,16 +243,30 @@ test.describe('Harness - Cron prompt-flow', () => {
await setMockBehavior(
'llmForcedResponses',
JSON.stringify([
+ {
+ content: '',
+ toolCalls: [
+ {
+ id: 'call_schedule_task_remove_1',
+ name: 'schedule_task',
+ arguments: JSON.stringify({ prompt: 'Delete the morning reminder.', blocking: true }),
+ },
+ ],
+ },
{
content: '',
toolCalls: [
{
id: 'call_cron_remove_1',
- name: 'cron_remove',
- arguments: JSON.stringify({ id: 'morning_reminder_delete_test' }),
+ name: 'cron',
+ arguments: JSON.stringify({
+ action: 'remove',
+ job_id: 'morning_reminder_delete_test',
+ }),
},
],
},
+ { content: 'The morning reminder is deleted.' },
{ content: `Done! I have deleted the morning reminder. ${CANARY}` },
])
);
diff --git a/crates/openhuman-core/src/agent/orchestration/tools.rs b/crates/openhuman-core/src/agent/orchestration/tools.rs
index 08b3a87d34..a5a87f1dda 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools.rs
@@ -61,7 +61,7 @@ mod wait_subagent;
#[path = "tools/worker_thread.rs"]
mod worker_thread;
-pub(crate) use dispatch::{dispatch_subagent, DelegationDispatch};
+pub(crate) use dispatch::{dispatch_subagent, DelegationDispatch, UseSkillDispatch};
pub(crate) use agent_prepare_context::AgentPrepareContextDispatch;
pub use agent_prepare_context::{
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
index 97b0bb092d..21864898d8 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
@@ -21,6 +21,69 @@ pub(crate) struct DelegationDispatch {
kind: DelegationDispatchKind,
}
+/// Typed dispatch for `use_skill` when its selected inner tool is a synthesized
+/// delegation. Plain `Tool::execute_with_context` cannot carry the hosted
+/// parent run context that a sub-agent needs, so route those inner calls back
+/// through [`DelegationDispatch`] and leave every ordinary packed tool on the
+/// proxy's existing execution path.
+pub(crate) struct UseSkillDispatch {
+ tool: Arc<dyn tinytools::Tool>,
+ tool_sets: Vec<Arc<Vec<Box<dyn tinytools::Tool>>>>,
+}
+
+impl UseSkillDispatch {
+ pub(crate) fn new(
+ tool: Arc<dyn tinytools::Tool>,
+ tool_sets: Vec<Arc<Vec<Box<dyn tinytools::Tool>>>>,
+ ) -> Self {
+ Self { tool, tool_sets }
+ }
+}
+
+#[async_trait]
+impl ToolDispatch<(), crate::agent::tinyagents::host::OpenHumanRunContext> for UseSkillDispatch {
+ fn tool(&self) -> Arc<dyn tinytools::Tool> {
+ self.tool.clone()
+ }
+
+ async fn execute(
+ &self,
+ state: &(),
+ arguments: serde_json::Value,
+ options: ToolCallOptions,
+ parent: &RunContext<crate::agent::tinyagents::host::OpenHumanRunContext>,
+ ) -> anyhow::Result<ToolResult> {
+ let skill = arguments.get("skill").and_then(serde_json::Value::as_str);
+ let inner_name = arguments.get("tool").and_then(serde_json::Value::as_str);
+ if let (Some(skill), Some(inner_name)) = (skill, inner_name) {
+ let belongs_to_pack = crate::tools::toolpacks::pack_for_tool(inner_name)
+ .is_some_and(|pack| pack.id == skill);
+ if belongs_to_pack {
+ if let Some(inner) =
+ crate::agent::tinyagents::tools::CanonicalSharedToolAdapter::for_name(
+ self.tool_sets.clone(),
+ inner_name,
+ )
+ .map(Arc::new)
+ {
+ if let Some(dispatch) = DelegationDispatch::for_tool(inner) {
+ let inner_args = arguments
+ .get("args")
+ .cloned()
+ .unwrap_or_else(|| serde_json::json!({}));
+ return dispatch.execute(state, inner_args, options, parent).await;
+ }
+ }
+ }
+ }
+
+ let context = ToolExecutionContext::from_run_context(parent);
+ self.tool
+ .execute_with_context(arguments, options, Some(&context))
+ .await
+ }
+}
+
enum DelegationDispatchKind {
Collapsed {
targets: Result<Vec<super::collapsed_delegation::DelegateTarget>, String>,
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader_tests_specialist_agents_tests.rs b/crates/openhuman-core/src/agent/registry/agents/loader_tests_specialist_agents_tests.rs
index b8b57c8bd9..6515bb21a1 100644
--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests_specialist_agents_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests_specialist_agents_tests.rs
@@ -214,12 +214,18 @@ fn specialist_agents_are_registered_with_narrow_tools() {
assert!(matches!(scheduler.model, ModelSpec::Hint(ref h) if h == "burst"));
match &scheduler.tools {
ToolScope::Named(names) => {
- for required in ["current_time", "cron_add", "cron_list", "cron_remove"] {
+ for required in ["current_time", "resolve_time", "cron"] {
assert!(
names.iter().any(|name| name == required),
"scheduler_agent missing `{required}`"
);
}
+ for legacy in ["cron_add", "cron_list", "cron_remove"] {
+ assert!(
+ !names.iter().any(|name| name == legacy),
+ "scheduler_agent must use collapsed `cron`, not `{legacy}`"
+ );
+ }
}
other => panic!("scheduler_agent must use Named tool scope, got {other:?}"),
}
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml b/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml
index 2fb6188103..e91c703f2a 100644
--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml
+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml
@@ -222,6 +222,10 @@ hint = "coding"
# `integrations_agent` — the orchestrator never calls composio_list_tools
# / composio_execute directly.
named = [
+ # Tool packs add this proxy to the visible set when they withhold member
+ # schemas. The hosted runtime also enforces this definition as its dispatch
+ # allowlist, so the proxy must be declared here as well as injected there.
+ "use_skill",
"read_workspace_state",
"ask_user_clarification",
# Direct coding surface. The Master Agent owns the normal inspect → edit →
diff --git a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/agent.toml b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/agent.toml
index 603d82ce1c..16fb3ac79c 100644
--- a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/agent.toml
+++ b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/agent.toml
@@ -18,4 +18,4 @@ hint = "burst"
# `resolve_time` turns "in 10 minutes" / "tomorrow 9am" into an exact
# timestamp for cron scheduling — `current_time` only reports now, leaving
# the model to do unreliable epoch arithmetic.
-named = ["current_time", "resolve_time", "cron_add", "cron_list", "cron_remove", "ask_user_clarification"]
+named = ["current_time", "resolve_time", "cron", "ask_user_clarification"]
diff --git a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.md
index ad292db1bc..164d0283c0 100644
--- a/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.md
+++ b/crates/openhuman-core/src/agent/registry/agents/scheduler_agent/prompt.md
@@ -4,25 +4,25 @@ You are the scheduling specialist. You own OpenHuman's **in-app scheduler** (its
## Scope boundary — fail fast, never thrash
-Your ONLY tools are `current_time`, `resolve_time`, `cron_add`, `cron_list`, `cron_remove`, and `ask_user_clarification`. They write to and read OpenHuman's own scheduled-job store — **not** any external service. You have **no** access to the user's live calendar, email, meetings, or video-call links, and you cannot read what is already on their schedule outside the cron jobs you manage.
+Your ONLY tools are `current_time`, `resolve_time`, `cron`, and `ask_user_clarification`. They write to and read OpenHuman's own scheduled-job store — **not** any external service. You have **no** access to the user's live calendar, email, meetings, or video-call links, and you cannot read what is already on their schedule outside the cron jobs you manage.
So the line is: **create/manage a future job → you. Read existing live data → not you.** If you are handed a task you cannot satisfy with your tools — e.g. reading or summarising an existing calendar event/meeting, checking availability, or fetching a meet/Zoom/Meet link — do **not** loop, guess, or try tools that cannot answer it. In a **single step**, return that this request needs the live calendar/email integration (not the scheduler), naming what you would have needed. Burning iterations on tools that can't satisfy the request is a failure, not effort.
## Rules
- Use `current_time` before interpreting relative times like "in 10 minutes", "tomorrow morning", or "every weekday".
-- Never call `run_skill` for built-in tools. `cron_add`, `cron_list`, `cron_remove`, and `current_time` are direct tools.
+- Never call `run_skill` for built-in tools. `cron` and `current_time` are direct tools.
- Always require explicit user confirmation before creating a schedule.
-- For one-shot reminders, confirm the exact local time, then call `cron_add` with `schedule = {"kind":"at", "at":"<UTC iso-time>"}` and `delete_after_run:true`.
+- For one-shot reminders, confirm the exact local time, then call `cron` with `action:"add"`, `schedule = {"kind":"at", "at":"<UTC iso-time>"}`, and `delete_after_run:true`.
- `schedule` is a typed JSON object, not a string. Never stringify it. Passing `"{\"kind\":\"at\",...}"` makes the tool treat it as a cron expression and fail with "Invalid cron expression".
-- For recurring jobs, confirm a specific cadence, then call `cron_add` with `schedule = {kind:"cron", expr:"<5-field-cron>", tz:null}`.
+- For recurring jobs, confirm a specific cadence, then call `cron` with `action:"add"` and `schedule = {kind:"cron", expr:"<5-field-cron>", tz:null}`.
- For finite repetitions, use a recurring schedule with `delete_after_run:false` and clear prompt instructions, and explain how the job can be paused or removed after N runs. Do not refuse or stall, set up the schedule.
- If the schedule is ambiguous, call `ask_user_clarification`.
- If a tool fails, report the failed tool and the actionable next step.
Common 5-field cron expressions: `"0 9 * * *"` (daily 9 AM), `"0 * * * *"` (hourly), `"*/30 * * * *"` (every 30 min), `"* * * * *"` (every minute).
-For an agent job, give `cron_add` a `job_type:"agent"` and a `prompt` that tells the future agent exactly what to deliver (e.g. "Send the user one random cricketer name, just the name.").
+For an agent job, call `cron` with `action:"add"`, `job_type:"agent"`, and a `prompt` that tells the future agent exactly what to deliver (e.g. "Send the user one random cricketer name, just the name.").
## Worked examples
@@ -40,9 +40,10 @@ User: "remind me at 11 PM tonight".
}
```
3. Confirm the resolved local time with the user.
-4. After the user confirms, call `cron_add` with an object-valued `schedule`:
+4. After the user confirms, call `cron` with an object-valued `schedule`:
```json
{
+ "action": "add",
"name": "tonight_11pm_reminder",
"schedule": {"kind": "at", "at": "<resolve_time.rfc3339>"},
"job_type": "agent",
@@ -55,9 +56,10 @@ User: "remind me at 11 PM tonight".
User: "send me a cricketer name every minute".
1. Confirm first: "got it, i'll send a name every minute via cron. ok?"
-2. After the user confirms, call `cron_add` directly (NOT `run_skill`):
+2. After the user confirms, call `cron` directly (NOT `run_skill`):
```json
{
+ "action": "add",
"schedule": {"kind": "cron", "expr": "* * * * *", "tz": null},
"job_type": "agent",
"prompt": "Send the user one random cricketer name, just the name.",
diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs
index 5027426ab1..4f5216489f 100644
--- a/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs
@@ -15,7 +15,7 @@ use crate::agent::orchestration::tools::{
AgentPrepareContextDispatch, CloseSubagentDispatch, ContinueSubagentDispatch,
DelegateGraphDispatch, DelegationDispatch, ListSubagentsDispatch, SpawnAsyncSubagentDispatch,
SpawnParallelAgentsDispatch, SpawnSubagentDispatch, SpawnWorkerThreadDispatch,
- SteerSubagentDispatch, WaitSubagentDispatch,
+ SteerSubagentDispatch, UseSkillDispatch, WaitSubagentDispatch,
};
use crate::agent::tinyagents::host::OpenHumanRunContext;
use crate::agent::tinyagents::tools::{CanonicalSharedToolAdapter, EarlyExitHook};
@@ -133,6 +133,11 @@ pub(super) fn register_turn_tools_and_agents(
harness.register_tool_dispatch(Arc::new(TodoToolDispatch::new(adapter)));
} else if name == "update_task" {
harness.register_tool_dispatch(Arc::new(UpdateTaskDispatch::new(adapter)));
+ } else if name == crate::tools::toolpacks::USE_SKILL {
+ harness.register_tool_dispatch(Arc::new(UseSkillDispatch::new(
+ adapter,
+ tool_sets.to_vec(),
+ )));
} else if let Some(dispatch) = DelegationDispatch::for_tool(adapter.clone()) {
harness.register_tool_dispatch(Arc::new(dispatch));
} else {
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index 7fc71e75d0..667ccc5cfa 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -253,6 +253,10 @@ pub fn all_tools_with_runtime(
Box::new(ResolveTimeTool::new()),
Box::new(DetectToolsTool::new()),
Box::new(InstallToolTool::new(security.clone())),
+ // The compact, advertised scheduler surface. Keep the six legacy
+ // tools registered below as hidden aliases so saved transcripts and
+ // skills remain replayable.
+ Box::new(CronTool::new(config.clone(), security.clone())),
Box::new(CronAddTool::new(config.clone(), security.clone())),
Box::new(CronListTool::new(config.clone())),
Box::new(CronRemoveTool::new(config.clone())),
diff --git a/crates/openhuman-core/src/tools/toolpacks/registry.rs b/crates/openhuman-core/src/tools/toolpacks/registry.rs
index 501bf1e529..4545d7cb35 100644
--- a/crates/openhuman-core/src/tools/toolpacks/registry.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/registry.rs
@@ -280,12 +280,7 @@ pub const PACKS: &[ToolPack] = &[
summary: "Reminders and scheduled jobs: create, list, update, remove, run and inspect one-shot and recurring jobs.",
tools: &[
"schedule_task",
- "cron_add",
- "cron_list",
- "cron_remove",
- "cron_update",
- "cron_run",
- "cron_runs",
+ "cron",
],
owners: &["scheduler_agent"],
},
diff --git a/scripts/prompt-budget.limits b/scripts/prompt-budget.limits
index 05332ce6ad..4ed3ff28d6 100644
--- a/scripts/prompt-budget.limits
+++ b/scripts/prompt-budget.limits
@@ -234,7 +234,7 @@ profile_memory_agent:8237:12774
settings_agent:7040:11065
context_scout:11076:7349
skill_executor:9594:7511
-scheduler_agent:9628:7227
+scheduler_agent:9615:7047
agent_memory:10422:6836
mcp_setup:10361:5078
skill_setup:7253:7604
@@ -260,7 +260,7 @@ critic:6215:2108
#
# Why the big ones are big, as of 2026-08-31:
#
-# memory (3,788) / cron (3,228) / todo (1,831)
+# memory (3,788) / cron (3,340) / todo (1,831)
# Collapsed families. `memory` replaced eleven tools worth 7,879 B and
# `cron` six worth 3,938 B, so each is large *because* the surface got
# smaller. A union schema costs more than any one member and less than
@@ -313,14 +313,15 @@ critic:6215:2108
# Discovery tools. Both are the recovery path for a withheld surface, so
# their descriptions carry the "here is what you can still reach" copy.
#
-# `memory`, `delegate_to` and `cron` were dropped 2026-09-18: no agent at
-# 93e9938f3 advertises them (nor does the default-features registry), so
-# the lookup below failed before any number was compared. The prose above
-# describes them as they were on 2026-09-01.
+# `memory` and `delegate_to` were dropped 2026-09-18: no agent at 93e9938f3
+# advertises them (nor does the default-features registry), so the lookup below
+# failed before any number was compared. The prose above describes them as they
+# were on 2026-09-01. `cron` returned when the scheduler's collapsed surface was
+# wired into the durable registry.
tool:spawn_subagent:3554
tool:propose_workflow:3170
tool:memory_tree:3008
-tool:cron_add:3222
+tool:cron:3340
tool:edit_workflow:2721
tool:generate_presentation:2662
tool:suggest_workflows:2445