Skip to content

Memory server race condition causes corrupted JSON #1819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
EllipticElysium opened this issue May 17, 2025 · 0 comments
Open

Memory server race condition causes corrupted JSON #1819

EllipticElysium opened this issue May 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@EllipticElysium
Copy link

Describe the bug
calling tool multiple times can cause the json file to become corrupted due to writing malformed data

To Reproduce
Steps to reproduce the behavior:
trigger multiple calls to Memory from a single LLM response (e.g. create entity, delete observation, add observation, and create relation)

Expected behavior
It should not be possible for the tool to write corrupted data to fle.

Ideally, it would correctly handle concurrent writes to ensure atomic operations

minimally, it would validate any data before being written, to ensure that malformed data is not saved and it fails gracefully.

Additional context
Currently This has to be resolved manually every time, once the file is corrupted it is not possible for the tool to recover/fix by itself, every operation fails

@EllipticElysium EllipticElysium added the bug Something isn't working label May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant