-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
SQL Statment [SQL: INSERT INTO entity (title, entity_type, entity_metadata, content_type, permalink, file_path, checksum, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)] fails with the error sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: entity.permalink
Steps To Reproduce
Steps to reproduce the behavior:
- Install version basic-machines 'v0.13.5'
- Issue a prompt that causes Claude to use tool the
write_noteto write a note - Issue a prompt that causes Claude to use tool the
write_noteto write a second note - Issue a prompt that tells Claude to replace the first note with the second note
Expected Behavior
The second note replaces the first note. There is only one note.
Actual Behavior
The update fails
Environment
- OS: macOS 15.1.1
- Python version: 3.13.0
- Basic Memory version: 0.13.5
- Installation method: uv
- Claude Desktop version (if applicable): Claude 0.10.14 (27cc6f763724a1af75b35c386a6b8d014eedc334) 2025-06-05T15:01:12.000Z
basic-memory-mcp.2025-06-17_15-29-404741.log
Additional Context
- See attached basic-memory log file
Possible Solution
- Catch this specific error and handle it as a drop/create in a transaction (write optimistic) Or
- Look up the permalink before attempting a write, and if found remove it, then write (write pessimistic) Or
- Do not change the permalink
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working