You run a routine Homebrew upgrade, send a prompt to an AI model from your terminal, and suddenly history logging breaks. That's what hit users of the llm CLI tool—prompting Simon Willison to ship patch llm 0.37.3 on November 16, 2026. By default, llm saves prompts and responses to ~/.config/io.datasette.llm/logs.db, and upgrading SQLite to 3.54.1 broke how JSON objects were assembled.
I checked the bug breakdown: as SQLite creator D. Richard Hipp explained, version 3.54.0 mistakenly treated the result of a (SELECT json_array(...)) subquery as ready-made JSON, even though the spec says a scalar subquery returns plain SQL text. Version 3.54.1 fixed that behavior, turning arrays into escaped strings. To pass a real JSON structure into json_object, llm 0.37.3 wraps subqueries in json():
-- In SQLite 3.54.0 this returned {"a":[1]}, in 3.54.1 it became {"a":"[1]"}
select json_object('a', (select json_array(1)));
-- Fix in llm 0.37.3: explicit JSON wrapping for SQLite 3.54.1
select json_object('a', json((select json_array(1))));
Calling json() tells the engine to embed [1] as an actual array without quotes. If you rely on local CLI tools, update with brew update && brew upgrade llm or pipx upgrade llm: your logs.db needs no migration and will resume saving conversations right away.