github mksglu/context-mode v1.0.68

latest releases: v1.0.74, v1.0.73, v1.0.72...
one day ago

Zero-Truncation Architecture

Session continuity no longer loses information. Full event data is stored in SessionDB, and snapshots use a reference-based format with runnable ctx_search tool calls instead of truncated text.

Breaking Changes

  • Snapshot format changed<session_resume> XML now uses reference-based sections with search tool calls instead of truncated inline text. Existing snapshots from older versions will still be consumed but won't have search references.

New Architecture

  • safeString() replaces truncate() — 33 call sites in extract.ts now store full event data instead of cutting at 300 chars. Tool responses, file paths, error messages — everything preserved.
  • Reference-based snapshots — Each section (files, errors, decisions, git, tasks, etc.) includes a summary + a runnable ctx_search(queries: [...], source: "session-events") call. The LLM searches for full details on demand instead of getting truncated text.
  • <how_to_search> instruction block — Every snapshot starts with instructions telling the LLM to use the provided search queries, not ask the user to re-explain.
  • Platform-aware search tool names — Snapshots use the correct platform-specific tool name via toolNamer (Claude Code, Gemini, Cursor, VS Code, Codex, Kiro).

Bug Fixes

  • Consistent 7-day session retention — Cursor and OpenCode previously used cleanupOldSessions(0) (immediate deletion). Now all 6 platforms use 7-day retention, enabling --continue to work reliably.
  • truncateString removed — Deleted from truncate.ts. Zero truncation remains in the session layer.
  • Session directive hardcoded tool namesession-directive.mjs now uses toolNamer("ctx_search") instead of hardcoded Claude Code MCP namespace.

Tests

  • 360 tests passing across 7 test files
  • Removed byte-budget assertions (2048-byte limit)
  • Added: search reference presence, no-ellipsis, how_to_search block, custom searchTool option

Full diff: 18 files changed, 768 insertions, 815 deletions.

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.