OpenBMB/ChatDev · error · DesignError

Agent node '{nid}' config must be an object

Error message

Agent node '{nid}' config must be an object

What it means

Defensive 400 raised when the resolved target path of the new tool file falls outside the function tools directory (the relative_to check fails). This blocks symlink or path tricks that escape the tools dir.

Source

Thrown at check/check.py:43

    if not names:
        raise DesignError("No node types registered; cannot validate workflow")
    return names


def _ensure_supported(graph: Dict[str, Any]) -> None:
    """Ensure the MVP constraints are satisfied for the provided graph."""
    for node in graph.get("nodes", []) or []:
        nid = node.get("id")
        ntype = node.get("type")
        allowed = _allowed_node_types()
        if ntype not in allowed:
            raise DesignError(
                f"Unsupported node type '{ntype}' for node '{nid}'. Only {allowed} nodes are supported."
            )
        if ntype == "agent":
            agent_cfg = node.get("config") or {}
            if not isinstance(agent_cfg, dict):
                raise DesignError(f"Agent node '{nid}' config must be an object")
            for legacy_key in ["memory"]:
                if legacy_key in agent_cfg:
                    raise DesignError(
                        f"'{legacy_key}' is deprecated. Use the new graph-level memory stores for node '{nid}'."
                    )


def load_config(
    config_path: Path,
    *,
    fn_module: Optional[str] = None,
    set_defaults: bool = True,
    vars_override: Optional[Dict[str, Any]] = None,
) -> DesignConfig:
    """Load, validate, and sanity-check a workflow file."""

    try:
        raw_data = read_yaml(config_path)

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Verify FUNCTION_CALLING_DIR is a real, consistently resolved path.
  2. Ensure the filename contains no path separators before calling the API.
  3. If maintaining a fork, run the same regex sanitization before invoking the write logic.
Defensive patterns

Strategy: validation

Validate before calling

assert '/' not in name and '..' not in name

Prevention

When it happens

Trigger: Practically unreachable via the public API because the filename regex already bans slashes and dots; can trigger if FUNCTION_CALLING_DIR is a symlink and resolution normalizes it differently, or if internal code bypasses the regex.

Common situations: Misconfigured FUNCTION_CALLING_DIR pointing through symlinks; direct calls to the internal logic with unsanitized filenames in tests or forks.

Understand the failure class

Background: Path traversal blocked: "path escapes the workspace" and "outside site root" errors when a path will not stay inside its allowed directory — this error's family across 26 libraries.

Related errors


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