# Upgrade Guide — v0.12.18

<!-- bump: patch -->

## What Changed

**Proactive Resume Heartbeat** — Previously, when a Telegram-linked session crashed unexpectedly (rather than being actively killed by the reaper), the Claude session UUID was lost because `persistResumeMapping` only ran at kill time. By then, the process was already dead and the UUID couldn't be discovered.

Now, `TopicResumeMap.refreshResumeMappings()` runs every 60 seconds, continuously updating the topic-to-UUID mapping for all active topic-linked sessions. This means the resume map always has a recent UUID on file, even if the session crashes between heartbeats.

Technical changes:
- `TopicResumeMap`: Added `refreshResumeMappings(topicSessions)` method with tmux liveness checks and multi-session UUID deduplication
- `TelegramAdapter`: Added `getAllTopicSessions()` to enumerate active topic-to-session mappings
- `server.ts`: Wired 60s heartbeat interval that feeds topic sessions into the resume map
- Constructor now accepts optional `tmuxPath` parameter

## What to Tell Your User

- **Session resume reliability**: "When your Telegram sessions restart, they now reliably resume from where they left off using claude --resume. Previously, if a session crashed unexpectedly, the next session would start fresh. Now the system continuously tracks session IDs so crashes don't lose context."

## Summary of New Capabilities

| Capability | How to Use |
|-----------|-----------|
| Proactive resume heartbeat | Automatic — runs every 60s for all topic-linked sessions |
| `TopicResumeMap.refreshResumeMappings()` | Called by server heartbeat with `telegram.getAllTopicSessions()` |
| `TelegramAdapter.getAllTopicSessions()` | Returns Map of topic-to-session mappings |
