microsoft/autogen · error · ValueError
Conflicting activation conditions for target '{target}' grou
Error message
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}') What it means
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.
Source
Thrown at python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py:255
ValueError: If edges pointing to the same target have different activation_condition values
"""
target_activation_conditions: Dict[str, Dict[str, str]] = {} # target_node -> {activation_group -> condition}
for node in self.nodes.values():
for edge in node.edges:
target = edge.target # The target node this edge points to
activation_group = edge.activation_group
if target not in target_activation_conditions:
target_activation_conditions[target] = {}
if activation_group in target_activation_conditions[target]:
if target_activation_conditions[target][activation_group] != edge.activation_condition:
# Find the source node that has the conflicting condition
conflicting_source = self._find_edge_source_by_target_and_group(
target, activation_group, target_activation_conditions[target][activation_group]
)
raise ValueError(
f"Conflicting activation conditions for target '{target}' group '{activation_group}': "
f"'{target_activation_conditions[target][activation_group]}' (from node '{conflicting_source}') "
f"and '{edge.activation_condition}' (from node '{node.name}')"
)
else:
target_activation_conditions[target][activation_group] = edge.activation_condition
def _find_edge_source_by_target_and_group(
self, target: str, activation_group: str, activation_condition: str
) -> str:
"""Find the source node that has an edge pointing to the given target with the given activation_group and activation_condition."""
for node_name, node in self.nodes.items():
for edge in node.edges:
if (
edge.target == target
and edge.activation_group == activation_group
and edge.activation_condition == activation_condition
):View on GitHub (pinned to 027ecf0a37)
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.
Example fix
// before builder.add_edge(summarizer, aggregator, activation_group="results", activation_condition="all") builder.add_edge(critic, aggregator, activation_group="results", activation_condition="any") # conflict // after builder.add_edge(summarizer, aggregator, activation_group="results", activation_condition="all") builder.add_edge(critic, aggregator, activation_group="results", activation_condition="all")
Defensive patterns
Strategy: validation
Validate before calling
seen: dict[tuple[str, str], str] = {}
for name, node in builder.nodes.items():
for e in node.edges:
key = (e.target, e.activation_group)
if key in seen and seen[key] != e.activation_condition:
raise ValueError(f"Conflicting activation_condition for {key}: {seen[key]} vs {e.activation_condition}")
seen[key] = e.activation_condition Type guard
def activation_conditions_consistent(builder: DiGraphBuilder) -> bool:
seen: dict[tuple[str, str], str] = {}
for node in builder.nodes.values():
for e in node.edges:
key = (e.target, e.activation_group)
if key in seen and seen[key] != e.activation_condition:
return False
seen[key] = e.activation_condition
return True Try / catch
try:
flow = GraphFlow(participants, graph_builder=builder)
except ValueError as e:
if "Conflicting activation conditions" in str(e):
# align activation_condition on all edges of the reported (target, group), or split groups
... Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Cycle detected without exit condition: {' -> '.join(cycle_no
- Graph has no nodes.
- Graph must have at least one start node
- Graph must have at least one leaf node
- Node '{node.name}' has a mix of conditional and unconditiona
AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15).
Data as JSON: /api/errors/db44ea2947dd5907.
Report an issue: GitHub.