From c01ddd8238bc032ac4115dd848bfe56e741e1c94 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 30 Sep 2026 08:11:51 +0200 Subject: [PATCH] hive-subagent-mcp: fix build against AcpRuntime's new policy parameter #4822 added a CompactionPolicy generic parameter and a policy argument to AcpRuntime::new. #4822 and #4824 (which added acp_runtime's call) were reviewed and CI'd independently and merged textually clean, so neither build caught that the two conflict: forge/main fails to compile with 'missing generics for struct AcpRuntime' and 'this function takes 4 arguments but 3 were supplied'. Parameterize AcpRuntime, matching this crate's documented no-mid-turn-compaction design (session.rs's module doc: subagents are bounded, single-batch work, not sessions long-lived enough to need in-place compaction). --- hive-subagent-mcp/src/session.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hive-subagent-mcp/src/session.rs b/hive-subagent-mcp/src/session.rs index 7043c167..a8d8dfae 100644 --- a/hive-subagent-mcp/src/session.rs +++ b/hive-subagent-mcp/src/session.rs @@ -1696,7 +1696,7 @@ async fn after_turn( fn spawn_and_track_acp( state: &Arc, name: &str, - runtime: AcpRuntime, + runtime: AcpRuntime, config: Config, prompt: String, verdict: Option, @@ -1743,11 +1743,20 @@ fn acp_session_file(sessions: &Path, name: &str) -> PathBuf { /// The ACP runtime `name`'s run drives, keeping its session id in /// [`acp_session_file`] and answering permission requests per /// [`acp_permits`]. -fn acp_runtime(command: AcpCommand, sessions: &Path, name: &str) -> AcpRuntime { +fn acp_runtime( + command: AcpCommand, + sessions: &Path, + name: &str, +) -> AcpRuntime { let groups = hive_sh4re::permissions::effective_tool_groups(); let permit: PermissionPolicy = Arc::new(move |ask: &PermissionAsk<'_>| acp_permits(ask, &groups)); - AcpRuntime::new(command, acp_session_file(sessions, name), permit) + AcpRuntime::new( + command, + acp_session_file(sessions, name), + permit, + hive_claude::NeverCompact, + ) } /// Whether an ACP subagent may run the tool call it asks about.