The LLM could never delete memories because memory_id was stripped from all tool responses, making the mem0_delete tool unusable.
Changes
mem0_list_all: Added [id] prefix before each memory text
mem0_search: Added id field to each result item
_format_search_results (prefetch context): Added [id] prefix in injected <mem0_context>
Fixed mem0_search to filter out empty-text results (consistent with mem0_list_all)
## Summary
The LLM could never delete memories because `memory_id` was stripped from all tool responses, making the `mem0_delete` tool unusable.
## Changes
- **`mem0_list_all`**: Added `[id]` prefix before each memory text
- **`mem0_search`**: Added `id` field to each result item
- **`_format_search_results`** (prefetch context): Added `[id]` prefix in injected `<mem0_context>`
- Fixed `mem0_search` to filter out empty-text results (consistent with `mem0_list_all`)
The LLM could not delete memories because IDs were stripped from tool
responses. Now all three output paths include memory IDs:
- mem0_list_all: [id] prefix before each memory text
- mem0_search: id field in each result item
- prefetch context: [id] prefix in injected <mem0_context>
✅ No issues found — changes look consistent with the stated intent.
The changes correctly implement the described logic:
_format_search_results: Correctly iterates to prepend [id] when available, falling back to text-only if ID is missing. The empty-text filtering logic is preserved.
mem0_list_all: Correctly adds [id] prefix to memory texts in the output list.
mem0_search: Correctly adds the id field to the result items and filters out empty-text results. The added check if not items after filtering is a safe guard against returning an empty list when the initial results check passed but all items were filtered out (consistent with the "filter out empty-text results" intent).
✅ No issues found — changes look consistent with the stated intent.
The changes correctly implement the described logic:
1. **`_format_search_results`**: Correctly iterates to prepend `[id]` when available, falling back to text-only if ID is missing. The empty-text filtering logic is preserved.
2. **`mem0_list_all`**: Correctly adds `[id]` prefix to memory texts in the output list.
3. **`mem0_search`**: Correctly adds the `id` field to the result items and filters out empty-text results. The added check `if not items` after filtering is a safe guard against returning an empty list when the initial `results` check passed but all items were filtered out (consistent with the "filter out empty-text results" intent).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The LLM could never delete memories because
memory_idwas stripped from all tool responses, making themem0_deletetool unusable.Changes
mem0_list_all: Added[id]prefix before each memory textmem0_search: Addedidfield to each result item_format_search_results(prefetch context): Added[id]prefix in injected<mem0_context>mem0_searchto filter out empty-text results (consistent withmem0_list_all)✅ No issues found — changes look consistent with the stated intent.
The changes correctly implement the described logic:
_format_search_results: Correctly iterates to prepend[id]when available, falling back to text-only if ID is missing. The empty-text filtering logic is preserved.mem0_list_all: Correctly adds[id]prefix to memory texts in the output list.mem0_search: Correctly adds theidfield to the result items and filters out empty-text results. The added checkif not itemsafter filtering is a safe guard against returning an empty list when the initialresultscheck passed but all items were filtered out (consistent with the "filter out empty-text results" intent).