# v0.24.21 — Slack Stability & Image Support

## What Changed

**Slack Socket Mode heartbeat** — Fixed a reconnect death loop where the connection cycled every ~90 seconds on quiet channels. The heartbeat timeout is now 5 minutes instead of 60 seconds, since Slack only sends events when someone posts a message.

**Workspace modes** — New workspaceMode config (dedicated or shared) with sensible defaults. Dedicated mode auto-joins channels and responds to all messages. Shared mode only responds when mentioned and does not auto-join. All settings individually overridable.

**Image/file support in Slack** — Messages with file attachments are now downloaded and passed to sessions with explicit read instructions, matching the Telegram image pipeline.

**Session injection race condition** — Fixed a timing issue where messages arriving shortly after session spawn could fail to inject because Claude was not ready yet. Now waits for Claude readiness before injection.

**Smart port allocation** — New agents scan for free ports instead of blindly defaulting to 4040 when registry allocation fails.

## What to Tell Your User

Slack got more reliable this update. The bot no longer disconnects and reconnects in a loop on quiet channels. Images and files sent in Slack are now fully supported, just like Telegram. There is also a new workspace mode setting that controls whether the bot responds to every message or only when mentioned.

## Summary of New Capabilities

- Slack workspace modes: dedicated (respond to everything, auto-join channels) and shared (mention-only, no auto-join)
- Slack image and file attachment support with automatic download and session delivery
- Socket Mode connection stability fix (5-minute heartbeat instead of 60 seconds)
- Session injection race condition fix for rapid message sequences
- Smart port allocation for new agent initialization
