v1.0.66
Breaking Changes
ctx_statsno longer accepts aresetparameter. Session data lifecycle is now managed exclusively throughctx_purge. Calls passingreset: truewill be ignored./clearand/compactno longer affect context-mode data. These IDE commands reset only the LLM conversation window — FTS5 indexes, session state, and analytics data persist across clears. Usectx_purgefor explicit data deletion.
New Features
ctx_purgetool — Explicit, confirm-gated deletion of all session data (FTS5 index, session DB, analytics). Requires aconfirm: trueparameter to execute, preventing accidental data loss. Works correctly after--continueresumes. (#200)- Platform-isolated content DB — Each IDE/adapter now gets its own FTS5 database, eliminating hash mismatches and cross-contamination between concurrent sessions in different editors (e.g., Claude Code and Copilot running in the same project).
CONTEXT_MODE_PROJECT_DIR— New universal environment variable for overriding the project directory across all 12 supported platforms. Replaces the previousOPENCLAW_HOMEsemantic which incorrectly used the install directory as the project directory.
Bug Fixes
- #227:
ctx_searchreturning empty results afterctx_batch_executewhen the session was started with/clear. Root cause:/clearwas resetting the FTS5 index, so batch-indexed content was lost on the next search. Now fixed by decoupling/clearfrom data lifecycle. (#227) - #200: FTS database lifecycle on
/clear— previously, clearing conversation history also wiped indexed content. Now handled exclusively by the explicitctx_purgetool. (#200) - Hash mismatch between content DB and session DB on Windows — Platform-isolated DB paths now use
hashProjectDir(), a shared helper that produces consistent hashes across all code paths. ctx_purgeafter--continue— Purge now correctly identifies and deletes session data when resuming a previous session.ctx_purgedeletion reporting — Thedeletedarray now honestly reports only items that were actually removed from disk, rather than listing all expected paths.- Removed
OPENCLAW_HOMEsemantic bug — The install directory was incorrectly being used as the project directory, causing FTS5 databases to collide across different projects.
Internal
- Adapter-based session paths via
_detectedAdapter— Session and content DB paths are now derived from the detected adapter (e.g.,claude-code,vscode-copilot), ensuring platform isolation without user configuration. hashProjectDir()shared helper — Centralised project directory hashing eliminates duplicate logic and prevents hash divergence between content DB and session DB.- 85 tests passing — Test suite expanded to cover
ctx_purge, platform-isolated DBs, adapter detection, and analytics engine (315+ new test lines inserver.test.ts).
Upgrade Notes
- If you previously relied on
ctx_stats(reset: true)to clear session data, switch toctx_purge(confirm: true). - The
/clearcommand in your IDE will continue to work as expected for conversation history — it simply no longer touches context-mode's indexed knowledge base. - No configuration changes required.
CONTEXT_MODE_PROJECT_DIRis opt-in.
Full diff: 26 files changed, 863 insertions, 316 deletions.