v9.1.1

thedotmack/claude-memv9.1.1Feb 7, 2026by thedotmack

AI Summary

This patch release fixes a critical bug in v9.1.0 that prevented database initialization on existing installations. The release addresses three major issues: foreign key constraint failures during migration, hardcoded CHECK constraints that conflicted with custom observation types, and incorrect Express middleware ordering. Additionally, the mem-search skill has been restored with an updated 3-layer workflow.

Key Highlights

  • Fixed FOREIGN KEY constraint failure during migration by disabling FK checks during table recreation
  • Removed 5 hardcoded CHECK constraints on observation type column that blocked custom observation types
  • Fixed Express middleware ordering - moved initialization guard before route registrations
  • Added dedicated early handler for `/api/context/inject` to fail-open during initialization
  • Restored mem-search skill with updated 3-layer workflow (search → timeline → batch fetch)

New Features

  • Restored mem-search skill with 3-layer workflow updated for current MCP tool set

Full Release Notes

## Critical Bug Fix: Worker Initialization Failure

**v9.1.0 was unable to initialize its database on existing installations.** This patch fixes the root cause and several related issues.

### Bug Fixes

- **Fix FOREIGN KEY constraint failure during migration** — The `addOnUpdateCascadeToForeignKeys` migration (schema v21) crashed when orphaned observations existed (observations whose `memory_session_id` has no matching row in `sdk_sessions`). Fixed by disabling FK checks (`PRAGMA foreign_keys = OFF`) during table recreation, following SQLite's recommended migration pattern.

- **Remove hardcoded CHECK constraints on observation type column** — Multiple locations enforced `CHECK(type IN ('decision', 'bugfix', ...))` but the mode system (v8.0.0+) allows custom observation types, causing constraint violations. Removed all 5 occurrences across `SessionStore.ts`, `migrations.ts`, and `migrations/runner.ts`.

- **Fix Express middleware ordering for initialization guard** — The `/api/*` guard middleware that waits for DB initialization was registered AFTER routes, so Express matched routes before the guard. Moved guard middleware registration BEFORE route registrations. Added dedicated early handler for `/api/context/inject` to fail-open during init.

### New

- **Restored mem-search skill** — Recreated `plugin/skills/mem-search/SKILL.md` with the 3-layer workflow (search → timeline → batch fetch) updated for the current MCP tool set.