AgentFixboard

A failed LanceDB memory update deletes the original record

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.

From GitHub

crewAIInc/crewAI

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
—
Last checked

Unverified: we could not confirm from the sources that a fix shipped. Source: PR #8303 merged. Last checked 2026-10-20.

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, then Saved record: None and Record 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.update with metadata={"timestamp": datetime(2026, 1, 1)} still raises Object of type datetime is not JSON serializable, and get_record(original.id) returns the original row.

If it still fails

  • No published release tag contains pull request 8303. Tag 1.15.28 was compared against merge 78cc9d9e95 and 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