From 59412452af37a359de333bdfdac8d4116c63b770 Mon Sep 17 00:00:00 2001 From: damocles Date: Mon, 18 May 2026 18:37:44 +0200 Subject: [PATCH 1/2] format_loose_ends: align output text with rename (loose end(s) / no loose ends) --- hive-ag3nt/src/mcp.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs index 774fd6fd..87b83505 100644 --- a/hive-ag3nt/src/mcp.rs +++ b/hive-ag3nt/src/mcp.rs @@ -129,21 +129,22 @@ pub fn format_recv(resp: Result) -> String { } /// Format helper for `get_loose_ends`: renders a short bulleted list -/// of pending approvals + questions. Empty list collapses to a clear -/// marker so claude doesn't go hunting for a payload that isn't there. +/// of pending approvals + questions + reminders. Empty list collapses +/// to a clear marker so claude doesn't go hunting for a payload that +/// isn't there. pub fn format_loose_ends(resp: Result) -> String { use std::fmt::Write as _; - let threads = match resp { + let loose_ends = match resp { Ok(SocketReply::LooseEnds(t)) => t, Ok(SocketReply::Err(m)) => return format!("get_loose_ends failed: {m}"), Ok(other) => return format!("get_loose_ends unexpected response: {other:?}"), Err(e) => return format!("get_loose_ends transport error: {e:#}"), }; - if threads.is_empty() { - return "(no open threads)".to_owned(); + if loose_ends.is_empty() { + return "(no loose ends)".to_owned(); } - let mut out = format!("{} open thread(s):\n", threads.len()); - for t in &threads { + let mut out = format!("{} loose end(s):\n", loose_ends.len()); + for t in &loose_ends { match t { hive_sh4re::LooseEnd::Approval { id, From 2b38805c00ad60947f5c0a029c597ba909a47f92 Mon Sep 17 00:00:00 2001 From: damocles Date: Mon, 18 May 2026 18:49:12 +0200 Subject: [PATCH 2/2] =?UTF-8?q?cancel=5Floose=5Fend:=20canonicalize=20kind?= =?UTF-8?q?=20in=20success=20ack=20(alias=20'q'=20=E2=86=92=20'question')?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hive-ag3nt/src/mcp.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs index 87b83505..ace175aa 100644 --- a/hive-ag3nt/src/mcp.rs +++ b/hive-ag3nt/src/mcp.rs @@ -206,6 +206,17 @@ fn parse_loose_end_kind(raw: &str) -> Result &'static str { + match kind { + hive_sh4re::CancelLooseEndKind::Question => "question", + hive_sh4re::CancelLooseEndKind::Reminder => "reminder", + } +} + /// Format helper for `whoami`: renders the identity block as a short /// human-readable string. Skips fields that are `None` so the output /// doesn't carry dead placeholders. @@ -492,13 +503,13 @@ impl AgentServer { )] async fn cancel_loose_end(&self, Parameters(args): Parameters) -> String { let log = format!("{args:?}"); - let kind_label = args.kind.clone(); let id = args.id; run_tool_envelope("cancel_loose_end", log, async move { let kind = match parse_loose_end_kind(&args.kind) { Ok(k) => k, Err(e) => return e, }; + let kind_label = loose_end_kind_label(kind); let (resp, retries) = self .dispatch(hive_sh4re::AgentRequest::CancelLooseEnd { kind, id }) .await; @@ -1032,13 +1043,13 @@ impl ManagerServer { )] async fn cancel_loose_end(&self, Parameters(args): Parameters) -> String { let log = format!("{args:?}"); - let kind_label = args.kind.clone(); let id = args.id; run_tool_envelope("cancel_loose_end", log, async move { let kind = match parse_loose_end_kind(&args.kind) { Ok(k) => k, Err(e) => return e, }; + let kind_label = loose_end_kind_label(kind); let (resp, retries) = self .dispatch(hive_sh4re::ManagerRequest::CancelLooseEnd { kind, id }) .await;