Skip to content

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

refactor(agent_runs): drop unused cancel summary in subagent control

Steven Enamakele115e5c11121
diff --git a/crates/openhuman-core/src/agent_runs/subagent_control.rs b/crates/openhuman-core/src/agent_runs/subagent_control.rs
index 11dc86f9c9..a66b2d4241 100644
--- a/crates/openhuman-core/src/agent_runs/subagent_control.rs
+++ b/crates/openhuman-core/src/agent_runs/subagent_control.rs
@@ -156,10 +156,9 @@ fn handle_subagent_cancel(ctx: DispatchCtx, params: Map<String, Value>) -> Contr
}
Some(meta) => {
if meta.driver_managed {
- // The driver's awaited host-completion hook records the
- // terminal session state and delivers the failed event.
- // Publishing the legacy pseudo-completion here would
- // duplicate both effects.
+ // Active driver jobs finish through the awaited host hook.
+ // A paused job has already returned from that hook, so this
+ // handler settles and reports that one terminal transition.
if let Some(paused) = meta.driver_pause.as_ref() {
let store = subagent_sessions::SubagentSessionStore::new(
meta.workspace_dir.clone(),
@@ -172,17 +171,6 @@ fn handle_subagent_cancel(ctx: DispatchCtx, params: Map<String, Value>) -> Contr
)
})?;
if transitioned {
- let summary = match reason
- .as_deref()
- .map(str::trim)
- .filter(|reason| !reason.is_empty())
- {
- Some(reason) => format!(
- "You cancelled this background sub-agent before it finished. Reason: {reason}"
- ),
- None => "You cancelled this background sub-agent before it finished."
- .to_string(),
- };
let error = match reason
.as_deref()
.map(str::trim)