bytedance/deer-flow · error · ValueError

change_set.summaries.history must be an object

Error message

change_set.summaries.history must be an object

What it means

Error "change_set.summaries.history must be an object" thrown in bytedance/deer-flow.

Solutions

  1. Pass summaries.history as an object with the expected summary fields.
  2. Omit the history summary key if no history summary update is intended.

When it happens

Trigger: Thrown at backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/storage.py:785 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/972b3a222c9e3c19. Report an issue: GitHub.

Appendix: source

Thrown at backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/storage.py:785

            if existing is None:
                continue
            if delete_revisions and fact_id in delete_revisions and delete_revisions[fact_id] != existing.get("revision"):
                raise MemoryFactRevisionConflict(f"Expected fact {fact_id!r} revision {delete_revisions[fact_id]}, found {existing.get('revision')}")
            removals[fact_id] = (existing, fact_path)

        base = current_memory or create_empty_memory()
        user_section = copy.deepcopy(base.get("user", {}))
        history_section = copy.deepcopy(base.get("history", {}))
        if summaries is not None:
            if not isinstance(summaries, dict):
                raise ValueError("change_set.summaries must be an object")
            if "user" in summaries:
                if not isinstance(summaries["user"], dict):
                    raise ValueError("change_set.summaries.user must be an object")
                user_section.update(copy.deepcopy(summaries["user"]))
            if "history" in summaries:
                if not isinstance(summaries["history"], dict):
                    raise ValueError("change_set.summaries.history must be an object")
                history_section.update(copy.deepcopy(summaries["history"]))
        summaries_changed = user_section != base.get("user", {}) or history_section != base.get("history", {})
        needs_manifest_cleanup = current_memory is None or current_memory.get("version") != DOCUMENT_VERSION or "facts" in current_memory
        if not prepared and not removals and not summaries_changed and not needs_manifest_cleanup:
            memory_file = current_memory or {
                "version": DOCUMENT_VERSION,
                "revision": 0,
                "lastUpdated": base.get("lastUpdated", utc_now_iso_z()),
                "user": user_section,
                "history": history_section,
            }
            return memory_file, []

        next_revision = current_revision + 1
        old_entries: dict[str, dict[str, str]] = {}
        for fact_id, (_, existing, fact_path) in prepared.items():
            if existing is not None:
                old_entries[fact_id] = {"path": fact_path.relative_to(path.parent).as_posix()}

View on GitHub (pinned to 1dd6ba1acb)