github mksglu/context-mode v1.0.22

6 hours ago

Bug Fix

Session continuity hooks silently failed on marketplace installs (#117)

Problem: All session hooks (posttooluse, sessionstart, userpromptsubmit, precompact) imported session modules from build/session/, which doesn't exist in marketplace installs. The try/catch {} silently swallowed errors — hooks exited 0 but did nothing. Session DB not created, compact recovery dead, event capture dead.

Fix: Replaced build/ imports with bundle-only loading. All 7 hooks (4 claude-code + 3 vscode-copilot) now load from esbuild bundles (session-*.bundle.mjs) via a shared session-loaders.mjs. No fallback — bundles are built by CI and shipped with every release.

Files changed:

  • hooks/session-loaders.mjs — new shared bundle loader
  • hooks/{posttooluse,precompact,sessionstart,userpromptsubmit}.mjs — bundle-only imports
  • hooks/vscode-copilot/{posttooluse,precompact,sessionstart}.mjs — bundle-only imports
  • .github/workflows/bundle.yml — builds session bundles in CI
  • tests/session-hooks-smoke.test.ts — marketplace simulation smoke tests

Thanks to @amoslives for reporting.

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.