sqlite-utils 4.0rc2: Written by Claude Fable, $149.25, Fixes Data Loss Bug

✍️ OpenClawRadar📅 Published: July 5, 2026🔗 Source
sqlite-utils 4.0rc2: Written by Claude Fable, $149.25, Fixes Data Loss Bug
Ad

Simon Willison shipped sqlite-utils 4.0rc2, a Python library for SQLite, written mostly by Claude Fable. The total cost: about $149.25 in API fees over 37 prompts and 34 commits, changing +1,321 -190 lines across 30 files.

What Changed

The release candidate fixes a critical data loss bug in Table.delete_where() — previously, it never committed, leaving the connection in-transaction and poisoning all subsequent writes. Here's the reproduction from Fable's analysis:

db = sqlite_utils.Database("dw.db")
db["t"].insert_all([{"id": i} for i in range(3)], pk="id")
db["t"].delete_where("id = ?", [0])
# conn.in_transaction is now True
db["t"].insert({"id": 50})
db["u"].insert({"a": 1})
db.close()
# Reopen: rows are [0, 1, 2] — the delete, row 50, AND table u are all gone.

Willison calls this a “really bad bug” — one he’s glad Fable caught before the stable 4.0 release.

New Transaction Model

Every write method (insert(), upsert(), update(), delete(), delete_where(), transform(), create_table(), enable_fts(), etc.) now runs inside its own transaction and commits before returning. No manual commit() needed.

Two exceptions:

  • Use db.atomic() to group multiple operations atomically
  • If you open a transaction with db.begin(), the library will never commit it — you control the commit
Ad

Python 3.12+ autocompat Support

Fable also ensured compatibility with Python 3.12's new sqlite3.connect(..., autocommit=True|False) mode. The library's automatic per-method transactions are designed for default connection mode, and Fable patched the test suite to pass under the new autocommit settings.

Review Process

Willison started the work on his iPhone via Claude Code for web, then switched to a laptop for final review via GitHub PRs. He says reviewing documentation edits first is an excellent way to understand what changed. A final review by GPT-5.5 caught additional edge cases — the full PR transcript is shared.

Who It's For

Python developers who use sqlite-utils for lightweight database ops and want a production-ready 4.0 release with proper transaction safety.

📖 Read the full source: HN AI Agents

Ad

👀 See Also

Steerling-8B: An Interpretable Language Model with Token-Level Attribution
Tools

Steerling-8B: An Interpretable Language Model with Token-Level Attribution

Guide Labs released Steerling-8B, an 8-billion-parameter language model trained on 1.35 trillion tokens that can trace any generated token to input context, human-understandable concepts, and training data sources. The model achieves competitive performance with models trained on 2-7× more data.

OpenClawRadar
Agent Architect: Free Tool Generates Complete Workspace Files for AI Agents
Tools

Agent Architect: Free Tool Generates Complete Workspace Files for AI Agents

Agent Architect is a free interactive tool that walks users through 40+ questions about their AI agent, then compiles everything into a formatted prompt to generate seven production-grade workspace files: SOUL.md, IDENTITY.md, AGENTS.md, OPERATIONS.md, TOOLS.md, MEMORY.md, and HEARTBEAT.md.

OpenClawRadar
🦀
Tools

Claude Code Skill Tax: 2,596 Installed Skills, 40 Used, $91/Month Wasted

Every installed Claude Code skill loads into every session's system prompt. One user measured 102,651 tokens loaded per session with 98.6% never used, costing ~$91/month. An open-source tool, skill-tax, audits usage and cost.

OpenClawRadar
ClawCodex /advisor Mode: Pair Cheap Worker with Expensive Reviewer to Cut Costs Without Losing Quality
Tools

ClawCodex /advisor Mode: Pair Cheap Worker with Expensive Reviewer to Cut Costs Without Losing Quality

Open-source Python coding agent ClawCodex adds an /advisor mode that pairs a cheap worker model (e.g., Haiku) with an expensive reviewer (e.g., Opus) at decision points, cutting costs several-fold without sacrificing architectural judgment.

OpenClawRadar