Symptom
LanceDBStorage.update() raises TypeError: Object of type datetime is not JSON serializable after it has already deleted the saved row, so get_record() returns None and the store count is 0.
Evidence what you'll see
- The report's local store prints
Object of type datetime is not JSON serializable, thenSaved record: NoneandRecord count: 0. - The same loss happens when metadata contains a
set. Rejecting invalid metadata is expected; losing the previous record is not. - The public
Memory.update(..., metadata=...)path delegates to this storage method.
Why it happens
The update deletes the stored record before it serializes the replacement. When json cannot encode datetime or set metadata, the exception lands after that delete has committed. Pull request 8303 serializes the replacement row and prepares its vector before deleting the stored version.
Affected versions
crewAI 1.15.28, main at c6e500ab37, Windows, Python 3.10.20, venv installed with uv from the repository lockfile. crewAI Tools is not used by the reproduction.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- The report's
LanceDBStorage.updatewithmetadata={"timestamp": datetime(2026, 1, 1)}still raisesObject of type datetime is not JSON serializable, andget_record(original.id)returns the original row.
If it still fails
- No published release tag contains pull request 8303. Tag
1.15.28was compared against merge78cc9d9e95and does not contain it. - The pull request says the delete/add sequence is still nontransactional for storage-write failures after serialization succeeds.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it