v2.1.0 — Session Memory, Image Handling, PAI Integration
What's New
Session Memory System
Three-layer persistence that keeps your conversations coherent across messages:
- Transcript safety net — per-session JSONL recording. When Claude prunes a session and
--resumefails silently, the bot detects it and re-injects conversation context automatically. - Permanent memory —
MEMORY.mdat~/.claude/MEMORY/TELEGRAM/stores cross-session knowledge (8K char cap). Injected into new sessions. - Daily interaction logs — written to
~/.claude/MEMORY/RELATIONSHIP/YYYY-MM/YYYY-MM-DD.md. PAI'sLoadContexthook reads these automatically, so Telegram conversations surface in desktop Claude Code sessions with zero configuration.
Mode Stickiness
All sessions now auto-lock to full mode for context continuity. Previously, conversational messages like "Yes" or "What were we talking about?" were routed to stateless lite mode, losing all context. Both models use the same sonnet — zero cost difference. Use /lite to opt out if needed.
Image Support
Send photos or image documents via Telegram — they're downloaded, saved to a temp file, and forwarded to Claude with a hint to view them using the Read tool.
Resume Failure Detection
When --resume fails silently (session was pruned by Claude Code), the bot detects it by comparing returned session_id to the stored one. The next message gets conversation context prepended automatically.
Clean Response Format
System prompts now override PAI output formatting. No more ═══ PAI ═══ headers or emoji bullet sections in Telegram responses — just clean conversational text.
Files Changed
- New:
src/transcript.ts,src/memory.ts - Modified:
src/full.ts,src/index.ts,src/sessions.ts,src/telegram.ts - Prompts:
prompts/full-system.md,prompts/lite-system.md - Docs:
CLAUDE.md,README.md,package.json
Upgrade Notes
- No breaking changes — drop-in replacement for v2.0.0
- New
data/transcripts/anddata/memory/directories are created automatically on first run - If you have PAI installed, Telegram memory integrates automatically via
~/.claude/MEMORY/
Full Changelog: v2.0.0...v2.1.0