{"record":{"id":"cabda7ba34e96bd4","repo":"bytedance/deer-flow","slug":"global-memory-json-path-is-not-an-object","errorCode":null,"errorMessage":"Global memory JSON {path} is not an object","messagePattern":"Global memory JSON (.+?) is not an object","errorType":"exception","errorClass":"MemoryStorageCorruption","httpStatus":null,"severity":"error","filePath":"backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/storage.py","lineNumber":655,"sourceCode":"            _, notifications = self._migrate_previous_default_bucket_locked(path, user_id=user_id)\n            if notifications:\n                notifications_by_agent.append((DEFAULT_AGENT_BUCKET, notifications))\n        return notifications_by_agent\n\n    @staticmethod\n    def _migration_equivalent(left: dict[str, Any], right: dict[str, Any]) -> bool:\n        ignored = {\"revision\", \"createdAt\", \"updatedAt\", \"scope\", \"title\", \"schemaVersion\"}\n        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}\n\n    def _load_memory_file(self, path: Path) -> dict[str, Any] | None:\n        if not path.exists():\n            return None\n        try:\n            value = json.loads(path.read_text(encoding=\"utf-8\"))\n        except (json.JSONDecodeError, OSError, UnicodeError) as exc:\n            raise MemoryStorageCorruption(f\"Failed to load global memory JSON {path}: {exc}\") from exc\n        if not isinstance(value, dict):\n            raise MemoryStorageCorruption(f\"Global memory JSON {path} is not an object\")\n        return value\n\n    def _recover_if_needed(self, path: Path) -> None:\n        \"\"\"Recover or clean a previously journaled multi-file operation.\n\n        Callers hold the scope's in-process and cross-process locks.\n        \"\"\"\n        journal_path = path.parent / \".memory.journal.json\"\n        if not journal_path.exists():\n            return\n        try:\n            journal = json.loads(journal_path.read_text(encoding=\"utf-8\"))\n            operation_id = str(journal[\"operationId\"])\n            if not operation_id or Path(operation_id).name != operation_id:\n                raise TypeError(\"operationId must be a plain path component\")\n            state = journal.get(\"state\")\n            old_entries = journal.get(\"oldEntries\", {})\n            agent_name = journal.get(\"agentName\")","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/storage.py#L637-L673","documentation":"Error \"Global memory JSON {path} is not an object\" thrown in bytedance/deer-flow.","triggerScenarios":"Thrown at backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/storage.py:655 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}