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()replacestruncate()— 33 call sites inextract.tsnow 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--continueto work reliably. truncateStringremoved — Deleted fromtruncate.ts. Zero truncation remains in the session layer.- Session directive hardcoded tool name —
session-directive.mjsnow usestoolNamer("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_searchblock, customsearchTooloption
Full diff: 18 files changed, 768 insertions, 815 deletions.