bytedance/deer-flow · error · MemoryStorageCorruption
Global memory JSON {path} is not an object
Error message
Global memory JSON {path} is not an object What it means
Error "Global memory JSON {path} is not an object" thrown in bytedance/deer-flow.
Source
Thrown at backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/storage.py:655
_, notifications = self._migrate_previous_default_bucket_locked(path, user_id=user_id)
if notifications:
notifications_by_agent.append((DEFAULT_AGENT_BUCKET, notifications))
return notifications_by_agent
@staticmethod
def _migration_equivalent(left: dict[str, Any], right: dict[str, Any]) -> bool:
ignored = {"revision", "createdAt", "updatedAt", "scope", "title", "schemaVersion"}
return {key: value for key, value in left.items() if key not in ignored} == {key: value for key, value in right.items() if key not in ignored}
def _load_memory_file(self, path: Path) -> dict[str, Any] | None:
if not path.exists():
return None
try:
value = json.loads(path.read_text(encoding="utf-8"))
except (json.JSONDecodeError, OSError, UnicodeError) as exc:
raise MemoryStorageCorruption(f"Failed to load global memory JSON {path}: {exc}") from exc
if not isinstance(value, dict):
raise MemoryStorageCorruption(f"Global memory JSON {path} is not an object")
return value
def _recover_if_needed(self, path: Path) -> None:
"""Recover or clean a previously journaled multi-file operation.
Callers hold the scope's in-process and cross-process locks.
"""
journal_path = path.parent / ".memory.journal.json"
if not journal_path.exists():
return
try:
journal = json.loads(journal_path.read_text(encoding="utf-8"))
operation_id = str(journal["operationId"])
if not operation_id or Path(operation_id).name != operation_id:
raise TypeError("operationId must be a plain path component")
state = journal.get("state")
old_entries = journal.get("oldEntries", {})
agent_name = journal.get("agentName")View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Replace the file content with a JSON object at the top level.
- Restore from a backup or delete the file to reset global memory.
When it happens
Trigger: Thrown at backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/storage.py:655 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/cabda7ba34e96bd4.
Report an issue: GitHub.