OpenBMB/ChatDev · error · ValueError

Node {node.id} missing loop_timer configuration

Error message

Node {node.id} missing loop_timer configuration

What it means

LoopTimerNodeExecutor requires a LoopTimerConfig; without it there is no duration/timeout to enforce, so execution fails fast instead of defaulting silently.

Source

Thrown at runtime/node/executor/loop_timer_executor.py:28


class LoopTimerNodeExecutor(NodeExecutor):
    """Track loop duration and emit output only after hitting the time limit.

    Supports two modes:
    1. Standard Mode (passthrough=False): Suppresses input until time limit, then emits message
    2. Terminal Gate Mode (passthrough=True): Acts as a sequential switch
       - Before limit: Pass input through unchanged
       - At limit: Emit configured message, suppress original input
       - After limit: Transparent gate, pass all subsequent messages through
    """

    STATE_KEY = "loop_timer"

    def execute(self, node: Node, inputs: List[Message]) -> List[Message]:
        config = node.as_config(LoopTimerConfig)
        if config is None:
            raise ValueError(f"Node {node.id} missing loop_timer configuration")

        state = self._get_state()
        timer_state = state.setdefault(node.id, {})

        # Initialize timer on first execution
        current_time = time.time()
        if "start_time" not in timer_state:
            timer_state["start_time"] = current_time
            timer_state["emitted"] = False

        start_time = timer_state["start_time"]
        elapsed_time = current_time - start_time

        # Convert max_duration to seconds based on unit
        max_duration_seconds = self._convert_to_seconds(
            config.max_duration, config.duration_unit
        )

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Add a LoopTimerConfig (e.g. duration seconds / max wait) to the node
  2. Schema-validate workflows containing loop_timer nodes
  3. Migrate old workflow files after runtime upgrades

Example fix

# before
Node(id='t1', node_type='loop_timer')

# after
Node(id='t1', node_type='loop_timer', config={'duration_seconds': 30})
Defensive patterns

Strategy: validation

Validate before calling

assert node.as_config(LoopTimerConfig) is not None

Prevention

When it happens

Trigger: Executing a loop_timer node whose as_config(LoopTimerConfig) is None.

Common situations: Workflow definitions authored without the timer config; version drift renaming timer fields; tests omitting config.

Related errors


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