Latest in AI
LLM Logs Crashing After a Homebrew Update? Check the SQLite Attachment Fix
LLM 0.37.3 fixes a legacy attachment logging crash on SQLite 3.54.1. Diagnose the matching error without deleting your conversation history.
If llm logs suddenly fails after an environment update, do not start by deleting the log database. LLM 0.37.3 fixes a specific compatibility problem: displaying an attachment from a tool result logged before LLM 0.32 can crash on SQLite 3.54.1 or later with AttributeError: 'str' object has no attribute 'get'. That is the scope described in the release notes, not a diagnosis of every logging failure.
The release arrived on November 16. This is separate from the earlier 0.37.2 credential-routing fixes. A failure while viewing local history is not, by itself, evidence of an API-key leak or a failed model request.
Match the error before changing the installation
Record the exact traceback, the LLM installation you are running and whether the failing history includes older tool results with attachments. Keep the conversation content private. A small error report should not require publishing the database that caused it.
The original issue reproduced the problem with Homebrew's Python 3.12 linked to SQLite 3.54.1 on macOS. Its failure occurred while displaying a legacy tool-result attachment. This explains why a dependency update could expose the problem even though the old conversation had not changed.
Check the runtime used by LLM, not merely whichever python or sqlite3 happens to come first in another shell. If you know the Python interpreter for that installation, this read-only check reports its linked SQLite version:
python -c "import sqlite3; print(sqlite3.sqlite_version)"
Replace python with that interpreter when necessary. A result from an unrelated virtual environment cannot confirm or rule out the affected setup. Likewise, an issue title referring broadly to SQLite 3.54 is less precise than the release's 3.54.1-and-later condition.
Update the reader, not the historical records
Use the package manager or environment that owns your LLM installation to update to 0.37.3 or a later release containing this fix. Avoid installing a second unrelated copy and assuming the original command now uses it.
Before experimenting with stored history, preserve a recoverable backup. The logging documentation provides llm logs path to locate the database and llm logs status to inspect logging status. LLM normally records prompts and responses there, so treat the file as private rather than attaching it to a public support ticket.
Then repeat the same history-viewing operation that failed. The useful acceptance check is that the affected attachment entry renders, not just that the program starts or a new conversation succeeds. Do not create paid model requests solely to test this local display problem.
If the same failure remains, report the installation path, relevant versions and sanitized traceback. Do not rewrite attachment records or remove old conversations simply to make the command complete. Those changes could hide the symptom without establishing its cause.
Why JSON became a string
SQLite distinguishes ordinary SQL text from a value passed directly out of a JSON function. A string that looks like an array can still become a quoted JSON string when inserted into an object. Its JSON function documentation explains this distinction.
The merged LLM fix wraps the attachment subquery in json(), making the intended JSON interpretation explicit. The problem was in constructing the display query's result, so it does not establish that the stored attachment data is corrupt. Maintainer tests cover the newer SQLite behavior; this guide does not claim an end-to-end reproduction on that runtime.
For application developers, the broader lesson is to test the type returned by nested JSON queries, not just whether the output parses. Both a JSON array and a JSON string containing array-shaped text can be valid JSON. A consumer expecting attachment objects still cannot use them interchangeably.
I'm Paras. I work at the intersection of AI, engineering and distribution.
I help technical teams turn dependency failures into clear troubleshooting guides developers can use.