Skip to content

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

refactor(orchestration): drop redundant borrows on subagent reason

Steven Enamakel69fdfa731f56
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 d10ad78758..6ebd043c83 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
@@ -599,7 +599,7 @@ impl ContinueSubagentTool {
worktree_path: None,
changed_files: Vec::new(),
dirty_status: None,
- stop: incomplete_stop(&reason),
+ stop: incomplete_stop(reason),
})
.await;
}
@@ -620,7 +620,7 @@ impl ContinueSubagentTool {
"continue_subagent",
&outcome.agent_id,
&outcome.task_id,
- &reason,
+ reason,
envelope,
))
}
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
index fe228bb560..cd74ecbdda 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
@@ -572,7 +572,7 @@ pub(crate) async fn dispatch_subagent_with_live_parent(
worktree_path: None,
changed_files: Vec::new(),
dirty_status: None,
- stop: incomplete_stop(&reason),
+ stop: incomplete_stop(reason),
})
.await;
}
@@ -589,8 +589,8 @@ pub(crate) async fn dispatch_subagent_with_live_parent(
tool_name,
&outcome.agent_id,
&outcome.task_id,
- &reason,
- incomplete_envelope(tool_name, &reason, &outcome.output, mode),
+ reason,
+ incomplete_envelope(tool_name, reason, &outcome.output, mode),
))
}
SubagentRunStatus::Cancelled => {
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 b6aa076b8f..00e5dc06a1 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
@@ -482,7 +482,7 @@ impl SpawnSubagentTool {
worktree_path: None,
changed_files: Vec::new(),
dirty_status: None,
- stop: incomplete_stop(&reason),
+ stop: incomplete_stop(reason),
})
.await;
}
@@ -505,7 +505,7 @@ impl SpawnSubagentTool {
"spawn_subagent",
&outcome.agent_id,
&outcome.task_id,
- &reason,
+ reason,
envelope,
))
}