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 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-01 19:17:18 -05:00
parent ec70be1e0d
commit 59f4576f8f

View file

@ -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,