Skip to content

[BUG] edit_note creates duplicate headings #390

@groksrc

Description

@groksrc

Bug Description

When editing a note the section heading is duplicated.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Write a new note and tell the LLM to add a section heading "Testing"
  2. Tell the LLM to edit the "Testing" section to add some content

Expected Behavior

After the edit there should only be one section heading "Testing"

Actual Behavior

There are two "Testing" headings.

Environment

  • OS: any
  • Basic Memory version: v0.15.2
  • Installation method: homebrew

Additional Context

https://logfire-us.pydantic.dev/basic-memory/basic-memory-cloud?q=trace_id%3D%27019a075c79f1e259fba4e55b0014ba98%27+and+span_id%3D%276f2b9ab740a333f8%27&spanId=6f2b9ab740a333f8&traceId=019a075c79f1e259fba4e55b0014ba98&env=-clear-&since=2025-10-21T15%3A21%3A32.401218Z&until=2025-10-21T15%3A21%3A32.401218Z

Possible Solution

We could possibly instruct the LLMs better, or we could handle it in the API calls with filtering or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions