# Upgrade Guide — v0.24.28

<!-- bump: patch -->

## What Changed

### Fix: Slack Sessions Losing Conversation Context

Slack sessions were spawning with incomplete context — the ring buffer only stored user messages, not bot (agent) responses. When a session died and respawned, the new session had no idea what the agent had previously said or done. This caused agents to repeat greetings, forget what was being discussed, and generally "lose the plot" after every message.

Three changes fix this:

1. Bot messages are now stored in the ring buffer alongside user messages, giving new sessions visibility into both sides of the conversation.
2. The context file now uses a human-readable thread history format (matching the Telegram format) instead of raw JSON, making it easier for Claude to understand the conversation flow.
3. Bot messages are correctly labeled as "Agent" in the history, so the session knows which messages are its own.

## What to Tell Your User

If your Slack agent was losing context between messages — repeating itself, forgetting what you were discussing, or greeting you fresh every time — that should be fixed now. The agent now sees the full conversation history (both your messages and its own replies) when picking up a conversation.

### Fix: Topic Creation API Now Supports Initial Messages

The `POST /telegram/topics` endpoint now accepts an optional `firstMessage` parameter. When provided, the message is sent to the new topic through the standard `sendToTopic` pipeline, which means it gets properly logged to both the JSONL message log and TopicMemory.

Previously, sessions that created topics and sent initial messages via direct Telegram API calls would bypass the logging pipeline. When a new session later spawned in that topic, the thread history was empty — the session had no idea what the topic was about.

The endpoint also now uses `findOrCreateForumTopic` instead of `createForumTopic`, preventing duplicate topics when called with the same name.

## What to Tell Your User

If your Slack agent was losing context between messages — repeating itself, forgetting what you were discussing, or greeting you fresh every time — that should be fixed now. The agent now sees the full conversation history (both your messages and its own replies) when picking up a conversation.

Also, new topics created by the agent will now properly carry their initial context message into any sessions that spawn there.

## Summary of New Capabilities

| Capability | How to Use |
|-----------|-----------|
| Full Slack conversation context | Automatic — sessions now see both sides of the conversation |
| Topic creation with context | `POST /telegram/topics` with `firstMessage` parameter |
