Describe the bug
Deleting a session whose episodic memory is not open builds the whole memory first, and building it creates the session's storage when it is missing. So deleting a session that was never written to creates a vector store collection and a segment store partition, only to delete them.
As of 82b6c6f58 (main), paths under packages/server/src/memmachine_server/:
episodic_memory/episodic_memory_manager.py:288, delete_episodic_session: when the instance is not cached, it calls episodic_memory_params_from_config and builds an EpisodicMemory to call delete_session_episodes on it.
episodic_memory/long_term_memory/service_locator.py:92, _event_params: on the event backend, this opens the session's vector store collection, creating it when absent (create_collection, line 125), and opens or creates its segment store partition (open_or_create_partition, line 140).
Deletion therefore depends on creation succeeding. Any failure to create the storage (a backend error, a timeout) fails the deletion, even when there was nothing to delete.
Steps to reproduce
- Create a project or session, and do not add any memories to it.
- Delete it.
- The event backend creates the session's vector store collection and segment store partition, then deletes them (visible as a create followed by a delete in the backends).
Expected behavior
Deleting a session deletes whatever storage it has, by key, and creates none.
Notes
Environment
- MemMachine:
main at 82b6c6f58
🤖 Written by Claude Code (Claude Opus 5.5) on behalf of @edwinyyyu.
Describe the bug
Deleting a session whose episodic memory is not open builds the whole memory first, and building it creates the session's storage when it is missing. So deleting a session that was never written to creates a vector store collection and a segment store partition, only to delete them.
As of
82b6c6f58(main), paths underpackages/server/src/memmachine_server/:episodic_memory/episodic_memory_manager.py:288,delete_episodic_session: when the instance is not cached, it callsepisodic_memory_params_from_configand builds anEpisodicMemoryto calldelete_session_episodeson it.episodic_memory/long_term_memory/service_locator.py:92,_event_params: on the event backend, this opens the session's vector store collection, creating it when absent (create_collection, line 125), and opens or creates its segment store partition (open_or_create_partition, line 140).Deletion therefore depends on creation succeeding. Any failure to create the storage (a backend error, a timeout) fails the deletion, even when there was nothing to delete.
Steps to reproduce
Expected behavior
Deleting a session deletes whatever storage it has, by key, and creates none.
Notes
Environment
mainat82b6c6f58🤖 Written by Claude Code (Claude Opus 5.5) on behalf of @edwinyyyu.