diff --git a/src/cleveragents/core/application.py b/src/cleveragents/core/application.py index 864cbbcc..df80a55b 100644 --- a/src/cleveragents/core/application.py +++ b/src/cleveragents/core/application.py @@ -633,21 +633,10 @@ class ReactiveCleverAgentsApp: self.stream_router.split_stream(source, targets) self.logger.debug(f"Split stream {source} into {list(targets.keys())}") - # Re-setup subscriptions after all merges/splits to ensure proper connections - # Only check routes - all_stream_names = set() - - # Add stream routes - for route_name, route_config in self.config.routes.items(): - if route_config.type == RouteType.STREAM: - all_stream_names.add(route_name) - - # Re-setup subscriptions - for stream_name in all_stream_names: - if stream_name in self.stream_router.stream_configs: - self.stream_router._setup_subscriptions( - self.stream_router.stream_configs[stream_name] - ) + # NOTE: Subscriptions are already set up in create_stream() + # Re-setting them here would create duplicates, causing double output + # Merge and split operations automatically handle stream connections + self.logger.debug("Stream operations setup completed - subscriptions already configured") # Removed _setup_langgraphs - use routes instead