From 59f4576f8f8914467cf0e46b5f119f1fff8ebddf Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 1 Mar 2026 19:17:18 -0500 Subject: [PATCH] Fix SubAgentEvent double-logging by making trace() a no-op Inner events are already traced at origin by the sub-agent's own EventEmitter, so the SubAgentEvent wrapper should not re-trace them. This matches the pattern used by PipelineEvent::Agent and PipelineEvent::ExecutionEnv. Co-Authored-By: Claude Opus 4.6 --- crates/arc-agent/src/types.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/arc-agent/src/types.rs b/crates/arc-agent/src/types.rs index ff2aaafab..73a4ca5d3 100644 --- a/crates/arc-agent/src/types.rs +++ b/crates/arc-agent/src/types.rs @@ -361,9 +361,7 @@ impl AgentEvent { Self::SubAgentClosed { agent_id, depth } => { debug!(session_id, agent_id, depth, "Sub-agent closed"); } - Self::SubAgentEvent { event, .. } => { - event.trace(session_id); - } + Self::SubAgentEvent { .. } => {} Self::McpServerReady { server_name, tool_count,