Skip to content

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

refactor(agent): add message_run_queue field to subagent options

Steven Enamakelecbeed776dad
diff --git a/crates/openhuman-core/src/agent/harness/graph.rs b/crates/openhuman-core/src/agent/harness/graph.rs
index 0b5bf039e1..29ab4c31b3 100644
--- a/crates/openhuman-core/src/agent/harness/graph.rs
+++ b/crates/openhuman-core/src/agent/harness/graph.rs
@@ -168,6 +168,7 @@ pub(crate) async fn run_channel_turn_via_graph(
context_window,
// No mid-flight steering on the channel path.
run_queue: None,
+ message_run_queue: None,
// Same pause as the chat path: a channel turn's continuation is the
// user's next message, so ending the turn on the question is the whole
// mechanism. Without this the model answers its own question (see
diff --git a/crates/openhuman-core/src/agent/orchestration/delegation.rs b/crates/openhuman-core/src/agent/orchestration/delegation.rs
index d0935ffbd1..ee3ff81777 100644
--- a/crates/openhuman-core/src/agent/orchestration/delegation.rs
+++ b/crates/openhuman-core/src/agent/orchestration/delegation.rs
@@ -283,6 +283,7 @@ fn delegation_subagent_options(
worktree_action_dir,
workspace_descriptor,
run_queue: None,
+ message_run_queue: None,
}
}
diff --git a/crates/openhuman-core/src/agent/orchestration/ops.rs b/crates/openhuman-core/src/agent/orchestration/ops.rs
index 0065e03c07..4a2ddcccaf 100644
--- a/crates/openhuman-core/src/agent/orchestration/ops.rs
+++ b/crates/openhuman-core/src/agent/orchestration/ops.rs
@@ -402,6 +402,7 @@ impl AgentOrchestrationSession {
// cooperative `CancellationToken` and an `AbortHandle` below, which
// is what `abort_all` uses.
run_queue: None,
+ message_run_queue: None,
};
let session = self.clone();
diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs
index 527d42a7f8..a37b01d582 100644
--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs
+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs
@@ -90,6 +90,7 @@ async fn run_one_parallel_task(
worktree_action_dir,
workspace_descriptor,
run_queue: None,
+ message_run_queue: None,
};
let run_result =
run_subagent_with_parent(live_parent, definition.clone(), prompt.clone(), options).await;
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
index e5c3d48629..dd3f9262ca 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
@@ -452,6 +452,7 @@ impl ContinueSubagentTool {
worktree_action_dir,
workspace_descriptor,
run_queue: None,
+ message_run_queue: None,
};
// Run the sub-agent from its checkpoint
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
index 8078e30d83..0d5a3b46b8 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
@@ -415,6 +415,7 @@ pub(crate) async fn dispatch_subagent_with_live_parent(
worktree_action_dir,
workspace_descriptor: parent_workspace_descriptor,
run_queue: None,
+ message_run_queue: None,
};
let run =
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
index 46ab973ab3..358f266407 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
@@ -415,6 +415,7 @@ impl SpawnAsyncSubagentTool {
worktree_action_dir: background_worktree_action_dir,
workspace_descriptor: background_workspace_descriptor,
run_queue: Some(task_queue),
+ message_run_queue: None,
};
let result = crate::agent::subagent_host::run_async_spawn_via_driver_tool(
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
index 2c951c4463..ea61a306bf 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
@@ -322,6 +322,7 @@ impl SpawnSubagentTool {
worktree_action_dir,
workspace_descriptor,
run_queue: None,
+ message_run_queue: None,
};
let run =
diff --git a/crates/openhuman-core/src/agent/session_host/turn/graph.rs b/crates/openhuman-core/src/agent/session_host/turn/graph.rs
index c324a97567..99de35da29 100644
--- a/crates/openhuman-core/src/agent/session_host/turn/graph.rs
+++ b/crates/openhuman-core/src/agent/session_host/turn/graph.rs
@@ -150,6 +150,7 @@ pub(crate) async fn run_chat_turn_graph(graph: ChatTurnGraph) -> Result<Tinyagen
context_window: graph.context_window,
// Mid-flight steering from the session's run queue.
run_queue: graph.run_queue,
+ message_run_queue: None,
// `ask_user_clarification` pauses this turn: the turn returns the
// question as `outcome.text`, the caller ends the turn on it, and the
// user's next message is the answer. No resume plumbing is needed at
diff --git a/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rs b/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rs
index 823b80a444..ac46d701e6 100644
--- a/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rs
+++ b/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rs
@@ -335,6 +335,7 @@ impl SpawnWorkerThreadTool {
worktree_action_dir,
workspace_descriptor,
run_queue: None,
+ message_run_queue: None,
};
tracing::debug!(