github mksglu/context-mode v1.0.76

latest releases: v1.0.89, v1.0.88, v1.0.87...
15 hours ago

What's New in v1.0.76

This is a major stability release with 16 fixes across all 3 operating systems, a new SQLite backend for Linux, and significant improvements to hook reliability.


⚡ New Feature

  • node:sqlite adapter for Linux (#228) — On Linux + Node.js ≥ 22.13, context-mode now automatically uses the built-in node:sqlite module instead of better-sqlite3. This eliminates sporadic SIGSEGV crashes caused by V8's madvise bug corrupting native addon memory. No configuration needed — detection is automatic. Also resolves NODE_MODULE_VERSION mismatch errors after Node.js upgrades (#231).

🐛 Bug Fixes

Stability & Crash Prevention

  • MCP readiness sentinel (#230) — All tool redirects (WebFetch, curl/wget, inline HTTP, build tools) now check if the MCP server is alive before denying. If MCP hasn't started yet or crashed mid-session, original tools are allowed through as graceful degradation. PID liveness check protects against stale sentinels.
  • MCP -32000 "Connection closed" fix (#236) — Removed stdin listeners from lifecycle guard that conflicted with MCP SDK's StdioServerTransport, causing spurious server disconnections.
  • ctx_doctor crash prevention (#247) — FTS5 test DB and testExecutor now cleaned up in try/finally blocks, preventing potential segfault from V8 garbage-collecting unmanaged better-sqlite3 instances.
  • WAL checkpoint on exit + corrupt DB recovery (#244) — SQLite databases now checkpoint WAL on exit and recover from corrupt DB files automatically.
  • Orphaned WAL/SHM cleanup on Windows — Stale WAL/SHM files from crashed processes no longer cause "file is not a database" errors when creating fresh databases.

Hook Reliability

  • Windows username spaces (#239) — All 12 hook commands in hooks.json now quote ${CLAUDE_PLUGIN_ROOT} paths, fixing hook failures for Windows users whose username contains spaces (e.g. C:/Users/TECH SHOP/...).
  • Concurrent PostToolUse resilience (#243) — insertEvent transaction now wrapped with withRetry for SQLITE_BUSY defense-in-depth under parallel hook execution. Also propagates busy_timeout pragma to BunSQLiteAdapter. Thanks @james-gough-op!
  • Task/TaskCreate matcher fix (#229, #241) — PreToolUse hook no longer intercepts TaskCreate/TaskUpdate/TaskList todo tools. Task routing removed from PreToolUse; PostToolUse matcher narrowed.
  • Native ABI cache validation (#238) — Validates better-sqlite3 ABI cache via child-process probe before trusting it, preventing stale cache from causing load failures. Thanks @husniadil!

Context Optimization

  • Subagent ctx_commands omission (#233) — Subagent prompts no longer include the ~400-token <ctx_commands> section (ctx stats/doctor/upgrade/purge). Saves context on every Agent tool call.
  • Hook migration to session-loaders.mjs (#249) — 9 platform hooks migrated from build/session/ imports to session-loaders.mjs, improving startup reliability for marketplace installs.

Configuration

  • .mcp.json warning silenced (#253) — Uses relative path instead of ${CLAUDE_PLUGIN_ROOT} to prevent "missing env variable" warnings.
  • batch_execute label field guidance (#256) — All 12 adapter routing instructions now include guidance for the required label field in ctx_batch_execute commands.

🧪 Test & CI Improvements

  • vitest maxWorkers=3 (#258) — Capped parallel test workers to prevent fork exhaustion from spawnSync + better-sqlite3 under parallel load. 2.8x speedup with near-zero worker crashes.
  • MCP sentinel test setup — All 8 routing test files now set up MCP readiness sentinel, fixing 32 false test failures.
  • Windows CI green — Corrupt DB recovery tests skipped on Windows (file locking prevents WAL cleanup in parallel test workers).
  • Lifecycle regression guards (#236) — Test guards ensure stdin listeners never return to lifecycle guard.

📖 Documentation

  • Cursor additional_context upstream limitation documented in README
  • Hacker News #1 badge and company adoption list added
  • YouTube demo badge added
  • SQLite backend selection documented in platform-support.md

Issues Closed

#228, #229, #230, #231, #233, #236, #238, #239, #241, #243, #244, #247, #249, #253, #256, #258

PRs Merged

#237 (@ponythewhite), #238 (@husniadil), #243 (@james-gough-op), #253 & #255 (@flightlesstux)


Upgrade:

npm install -g context-mode@1.0.76

Full Changelog: v1.0.75...v1.0.76

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.