Skip to main content

Upgrade Process

Kernle handles database migrations automatically when you upgrade. However, there are a few things to be aware of.

Basic Upgrade

pyenv Users

If you use pyenv to manage Python versions, you must rehash after upgrading:
Without pyenv rehash, your shell will continue using stale console script shims that point to the old version. You’ll see symptoms like:
  • New CLI flags not being recognized (e.g., --budget)
  • kernle --version showing the old version even after upgrade
  • python -c "import kernle; print(kernle.__version__)" showing the correct version

Verifying the Upgrade

After upgrading, verify both the module and CLI are updated:

CLI Breaking Changes

0.10.0: -a/--agent renamed to -s/--stack

In v0.10.0, the global -a/--agent flag was renamed to -s/--stack to better reflect the architecture. The old flag is no longer recognized. What changed: What to update:
  1. Shell scripts and aliases — find-and-replace -a with -s and --agent with --stack :
  2. CLAUDE.md / AGENTS.md — update any CLI examples:
  3. OpenClaw plugin config — if you have custom hook commands referencing -a, update them. The bundled plugin was updated automatically.
  4. Claude Code hooks — re-run setup to regenerate hooks with the new flag:
  5. Environment variableKERNLE_STACK_ID is unchanged and still works as before.
The environment variable KERNLE_STACK_ID was not renamed. Only the CLI flag changed. If you rely on the env var for stack resolution, no changes are needed.

Database Migrations

Kernle automatically migrates your local SQLite database when you run any command after upgrading. Migrations are non-destructive and preserve all existing data.

0.2.x → 0.9.0 Migration

The 0.9.0 release introduces continuous strength and removes binary forgetting fields: What happens automatically:
  1. The strength column is added to all memory tables with default 1.0
  2. Memories previously marked is_forgotten=1 are migrated to strength = 0.0
  3. The memory_audit and stack_settings tables are created

0.1.x → 0.2.0 Migration

The 0.2.0 release includes a significant raw layer refactor that changes how raw entries are stored: What happens automatically:
  1. The blob and captured_at columns are added to raw_entries
  2. Existing content is migrated to blob with natural language formatting
  3. Tags are appended to the blob text (e.g., [tags: work, planning])
  4. FTS5 full-text search index is created for fast keyword search
Migration warning you might see:
This warning appears when the migration is in progress or needs to be triggered. It’s non-blocking - Kernle will continue to work, but you should run a command to complete the migration.

Triggering Migrations Manually

Migrations run automatically on any Kernle command. To explicitly trigger them:

Verifying Migration Success

After migration, the warning should disappear. You can also verify the raw layer is working:

Troubleshooting Migration Issues

”no such column: blob” Warning Persists

If the warning persists after running commands:
  1. Check SQLite version: FTS5 requires SQLite 3.9.0+
  2. Force schema recreation (safe - won’t delete data):
  3. Check file permissions: Ensure the database file is writable

FTS5 Search Not Working

If kernle raw search returns no results but you have raw entries:
  1. The FTS5 index may need rebuilding. This happens automatically, but you can force it:
  2. On older SQLite versions without FTS5, search falls back to LIKE queries (slower but functional).

Rollback (Emergency Only)

If you need to rollback to a previous version:
Rollback is safe for data but new features won’t be available. The database schema is backwards-compatible - old versions can read data created by new versions.

Version History