bytedance/deer-flow · error · ValueError

Honcho backend: {key}[{k!r}] has an empty value; remove the

Error message

Honcho backend: {key}[{k!r}] has an empty value; remove the entry or set a non-empty id.

What it means

Raised by HonchoConfig.from_backend_config when a workspace_overrides or user_peer_overrides mapping in memory.backend_config contains an entry whose value is null or an empty/whitespace-only string. These overrides map raw DeerFlow user ids to explicit Honcho workspace/peer ids, so an empty value would silently fall through to the default id derivation (empty string is falsy) or stringify YAML null into an id literally named 'None'. The backend fails fast at parse time instead.

Source

Thrown at backend/packages/harness/deerflow/agents/memory/backends/honcho/config.py:31

from typing import Any

_ID_RE = re.compile(r"[^a-zA-Z0-9_-]+")


def sanitize_id(raw: str) -> str:
    """Map an arbitrary string onto Honcho's id grammar (``^[a-zA-Z0-9_-]+$``; grammar allows up to 100, capped here at 64)."""
    return _ID_RE.sub("-", str(raw)).strip("-")[:64]


def _parse_override_map(cfg: dict[str, Any], key: str) -> dict[str, str]:
    """Overrides map raw user ids to explicit workspace/peer ids; an empty or
    null VALUE is always a config mistake (empty string is falsy and would
    silently fall through to the default derivation; YAML null would stringify
    into an id literally named "None"), so fail fast at parse time."""
    out: dict[str, str] = {}
    for k, v in (cfg.get(key) or {}).items():
        if v is None or not str(v).strip():
            raise ValueError(f"Honcho backend: {key}[{k!r}] has an empty value; remove the entry or set a non-empty id.")
        out[str(k)] = str(v)
    return out


@dataclass
class HonchoConfig:
    base_url: str = "http://localhost:8000"
    api_key: str | None = None
    workspace_prefix: str = "deerflow-u-"
    workspace_overrides: dict[str, str] = field(default_factory=dict)
    user_peer_overrides: dict[str, str] = field(default_factory=dict)
    assistant_peer: str = "deerflow"
    timeout_seconds: float = 10.0
    connect_timeout_seconds: float = 3.0
    message_char_limit: int = 8000
    max_injection_chars: int = 6000
    allow_insecure_http: bool = False
    read_fail_closed: bool = False

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Remove the offending key from workspace_overrides/user_peer_overrides so that user falls back to the default derivation (workspace_prefix + sanitized id)
  2. Set the entry to a real non-empty Honcho workspace/peer id, e.g. workspace_overrides: {"user@example.com": "team-a-ws"}
  3. Check for stray 'key:' lines with no value in config.yaml — YAML parses them as null

Example fix

# before (config.yaml)
memory:
  manager_class: honcho
  backend_config:
    workspace_overrides:
      user@example.com:   # null value -> ValueError

# after
memory:
  manager_class: honcho
  backend_config:
    workspace_overrides:
      user@example.com: team-a-ws   # or delete the line entirely
Defensive patterns

Strategy: validation

Validate before calling

from deerflow.agents.memory.backends.honcho.config import HonchoConfig

try:
    HonchoConfig.from_backend_config(backend_config)
except ValueError as e:
    # surface at config-load time with a clear operator message
    raise SystemExit(f"invalid honcho backend_config: {e}")

Try / catch

try:
    cfg = HonchoConfig.from_backend_config(backend_config)
except ValueError as e:
    # parse-time config error: fail fast, do not fall back to defaults
    raise

Prevention

When it happens

Trigger: Setting memory.manager_class: honcho with backend_config.workspace_overrides: {"user@example.com": } or {"user@example.com": ""} or {"user@example.com": null} in config.yaml (a YAML key with no value parses as null). Same for user_peer_overrides.

Common situations: YAML entries where the value was deleted but the key left behind; commenting out a value but not the key; copying an example config with placeholder empty values; intending 'use the default' for one user while overriding others (not supported — remove the entry instead).

Related errors


AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14). Data as JSON: /api/errors/15a73255e43d9272. Report an issue: GitHub.