{"record":{"id":"db44ea2947dd5907","repo":"microsoft/autogen","slug":"conflicting-activation-conditions-for-target-tar","errorCode":null,"errorMessage":"Conflicting activation conditions for target '{target}' group '{activation_group}': '{target_activation_conditions[target][activation_group]}' (from node '{conflicting_source}') and '{edge.activation_condition}' (from node '{node.name}')","messagePattern":"Conflicting activation conditions for target '(.+?)' group '(.+?)': '(.+?)' \\(from node '(.+?)'\\) and '(.+?)' \\(from node '(.+?)'\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py","lineNumber":255,"sourceCode":"            ValueError: If edges pointing to the same target have different activation_condition values\n        \"\"\"\n        target_activation_conditions: Dict[str, Dict[str, str]] = {}  # target_node -> {activation_group -> condition}\n\n        for node in self.nodes.values():\n            for edge in node.edges:\n                target = edge.target  # The target node this edge points to\n                activation_group = edge.activation_group\n\n                if target not in target_activation_conditions:\n                    target_activation_conditions[target] = {}\n\n                if activation_group in target_activation_conditions[target]:\n                    if target_activation_conditions[target][activation_group] != edge.activation_condition:\n                        # Find the source node that has the conflicting condition\n                        conflicting_source = self._find_edge_source_by_target_and_group(\n                            target, activation_group, target_activation_conditions[target][activation_group]\n                        )\n                        raise ValueError(\n                            f\"Conflicting activation conditions for target '{target}' group '{activation_group}': \"\n                            f\"'{target_activation_conditions[target][activation_group]}' (from node '{conflicting_source}') \"\n                            f\"and '{edge.activation_condition}' (from node '{node.name}')\"\n                        )\n                else:\n                    target_activation_conditions[target][activation_group] = edge.activation_condition\n\n    def _find_edge_source_by_target_and_group(\n        self, target: str, activation_group: str, activation_condition: str\n    ) -> str:\n        \"\"\"Find the source node that has an edge pointing to the given target with the given activation_group and activation_condition.\"\"\"\n        for node_name, node in self.nodes.items():\n            for edge in node.edges:\n                if (\n                    edge.target == target\n                    and edge.activation_group == activation_group\n                    and edge.activation_condition == activation_condition\n                ):","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py#L237-L273","documentation":"Raised by DiGraph._validate_activation_conditions when two edges that point to the same target node and share the same activation_group declare different activation_condition values. Within one activation group the target must activate under a single consistent rule ('all' or 'any'); conflicting conditions make the fan-in semantics undefined, so validation fails and names both the conflicting source node and the new one.","triggerScenarios":"Two parallel branches (e.g. summarizer + critic) both feeding an aggregator with activation_group=\"results\" but one edge says activation_condition=\"any\" and the other \"all\"; copy-pasting edge definitions and tweaking only one activation_condition; merging subgraphs built with different fan-in conventions.","commonSituations":"Fan-in/fan-out (scatter-gather) workflow sections; authoring parallel review graphs; refactoring where a new incoming edge to a joined node forgets to match the group's condition.","solutions":["Pick one activation_condition ('all' or 'any') per (target, activation_group) and set it identically on every edge in that group.","If the branches genuinely need different activation semantics, give them different activation_group names so they are validated independently.","Use the error message's source-node names to locate and align the offending edges."],"exampleFix":"// before\nbuilder.add_edge(summarizer, aggregator, activation_group=\"results\", activation_condition=\"all\")\nbuilder.add_edge(critic, aggregator, activation_group=\"results\", activation_condition=\"any\")  # conflict\n\n// after\nbuilder.add_edge(summarizer, aggregator, activation_group=\"results\", activation_condition=\"all\")\nbuilder.add_edge(critic, aggregator, activation_group=\"results\", activation_condition=\"all\")","handlingStrategy":"validation","validationCode":"seen: dict[tuple[str, str], str] = {}\nfor name, node in builder.nodes.items():\n    for e in node.edges:\n        key = (e.target, e.activation_group)\n        if key in seen and seen[key] != e.activation_condition:\n            raise ValueError(f\"Conflicting activation_condition for {key}: {seen[key]} vs {e.activation_condition}\")\n        seen[key] = e.activation_condition","typeGuard":"def activation_conditions_consistent(builder: DiGraphBuilder) -> bool:\n    seen: dict[tuple[str, str], str] = {}\n    for node in builder.nodes.values():\n        for e in node.edges:\n            key = (e.target, e.activation_group)\n            if key in seen and seen[key] != e.activation_condition:\n                return False\n            seen[key] = e.activation_condition\n    return True","tryCatchPattern":"try:\n    flow = GraphFlow(participants, graph_builder=builder)\nexcept ValueError as e:\n    if \"Conflicting activation conditions\" in str(e):\n        # align activation_condition on all edges of the reported (target, group), or split groups\n        ...","preventionTips":["Decide fan-in semantics ('all' vs 'any') once per join point and use it consistently.","Give distinct activation groups when branches need distinct activation rules.","Define joins in one place (helper function) instead of repeated inline add_edge calls."],"tags":["graph","validation","activation","fan-in"],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}