Skip to content

Slack bot: persist thread-to-session bindings across restarts #1399

Open

Description

@samuv

Summary

Persist the mapping between Slack conversations and Mecatl sessions so a bot
restart can resume an existing conversation.

The bot currently stores this mapping in process memory. After a restart, a
message in an existing Slack thread creates a new Mecatl session even when the
previous session remains available on the server.

Scope

  • Define a durable record for the Slack team, channel or DM, thread, and
    Mecatl session identifier.
  • Preserve the current one-session-per-DM and one-session-per-channel-thread
    behavior.
  • Validate the recorded session through the SDK before reuse.
  • Define behavior for missing, deleted, inaccessible, terminal, and stale
    sessions.
  • Prevent one Slack conversation or principal from adopting another
    conversation's session.
  • Make updates atomic enough that a crash cannot silently bind a thread to an
    unrelated session.
  • Add restart and stale-record tests.

Completion criteria

  • Restarting the bot preserves multi-turn context for a valid Slack
    conversation.
  • Invalid records fail closed and create a fresh session only under the
    documented recovery rule.
  • Concurrent messages cannot produce conflicting durable bindings.

References


Fully or partially written by an AI agent.

Activity

  1. added
    enhancement
    on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions