Skip to content

Python: a memory whose text equals the none yet placeholder is silently dropped on read #9725

Open

Description

Description

MemoryTopicRecord.to_markdown() writes - none yet as the placeholder line when a topic has no memories, and from_markdown() filters every bullet whose text equals none yet so the placeholder does not become a memory. The filter cannot distinguish the placeholder line from a genuine memory whose text happens to be exactly none yet, so that memory is silently dropped on every read.

Reproduced on current main: a topic written with memories=["none yet", "real fact"] reads back as ["real fact"]. The write succeeds, the loss is silent, and it repeats on every read_memory_topic, auto-load, and consolidation pass that reparses the file. A memory extraction or consolidation model returning that exact string, for example when recording no items currently, hits this directly.

Expected Behavior

Only the placeholder written for an empty memory list should be dropped on read. A genuine memory equal to the placeholder text must survive the round trip.

Steps to Reproduce

  1. Write a topic record whose memories include the exact string none yet alongside another memory.
  2. Read the topic back.

Minimal Reproduction

record = MemoryTopicRecord(topic="status", summary="s", memories=["none yet", "real fact"], updated_at=...)
MemoryTopicRecord.from_markdown(record.to_markdown()).memories  # ["real fact"] on main

Package Versions

agent_framework core from main.

Python Version

3.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions