OpenBMB/ChatDev · error · ValueError

Node {node.id} is not a human node

Error message

Node {node.id} is not a human node

What it means

HumanNodeExecutor.execute asserts node.node_type == 'human' before doing anything; a node of any other type routed here is a programming/serialization error.

Source

Thrown at runtime/node/executor/human_executor.py:29

from runtime.node.executor.base import NodeExecutor


class HumanNodeExecutor(NodeExecutor):
    """Executor used for human interaction nodes."""
    
    def execute(self, node: Node, inputs: List[Message]) -> List[Message]:
        """Execute a human node.
        
        Args:
            node: Human node definition
            inputs: Input messages
            
        Returns:
            Result supplied by the human reviewer
        """
        self._ensure_not_cancelled()
        if node.node_type != "human":
            raise ValueError(f"Node {node.id} is not a human node")
        
        human_config = node.as_config(HumanConfig)
        if not human_config:
            raise ValueError(f"Node {node.id} has no human configuration")
        
        human_task_description = human_config.description
        # Use prompt-style preview so humans see the same flattened text format
        # instead of raw message JSON.
        input_data = self._inputs_to_text(inputs)

        prompt_service = self.context.get_human_prompt_service()
        if prompt_service is None:
            raise RuntimeError("HumanPromptService is not configured; cannot execute human node")

        prompt_result = prompt_service.request(
            node.id,
            human_task_description or "",
            inputs=input_data,

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Route only nodes with node_type 'human' to this executor (normally via create_executor)
  2. Fix the workflow definition so the node's type matches the executor
  3. In tests, construct nodes with node_type='human'

Example fix

# before
node = Node(id='n1', node_type='agent')
HumanNodeExecutor(ctx).execute(node, [])

# after
node = Node(id='n1', node_type='human')
Defensive patterns

Strategy: type-guard

Validate before calling

assert node.node_type == 'human', node.node_type

Type guard

def is_human_node(node) -> bool:
    return node.node_type == 'human'

Prevention

When it happens

Trigger: Calling HumanNodeExecutor.execute directly with a non-human node, or a factory misroute binding this executor to another node type.

Common situations: Manual executor instantiation in tests; corrupted workflow JSON pairing the wrong executor class; refactor renaming node types without updating routing.

Related errors


AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27). Data as JSON: /api/errors/4f244919bd1a7da1. Report an issue: GitHub.