mnemom agent slackexits with code 2 and tells you how to enable it.--slackis hidden from--help.- the
slack_*settings are ignored, with a notice.
How it fits together
- Your Slack app. You create it from a manifest the CLI prints. It uses Socket Mode, so nothing needs a public URL.
- The router. One process per machine holds the Socket Mode connection and hands each incoming message to the right session. Slack delivers each event to only one open connection, so sessions do not connect on their own.
- The channel server.
--slackadds a small MCP channel server to the session. It shows routed messages to the model and gives it tools to reply.
Set up
1
Turn the feature on
2
Create the Slack app
<your user>-agents; names are cut to 35 characters.The manifest asks for these bot scopes:chat:writechat:write.customizeapp_mentions:readchannels:historygroups:historychannels:readchannels:joinusers:read
app_mention, message.channels and message.groups, and turns Socket Mode on.A manifest cannot create the app-level token. Under Basic Information → App-Level Tokens, create one with the connections:write scope.3
Log in
- the bot token (
xoxb-…), which it checks with Slack; - the app-level token (
xapp-…), which you can skip; - your Slack member ID (
U…), if no allowlist exists yet.
~/.mnemom/launcher.json (mode 0600). The environment variables MNEMOM_SLACK_BOT_TOKEN and MNEMOM_SLACK_APP_TOKEN override the stored values. The bot token is never exported into a session’s environment.Your member ID becomes the first entry on the sender allowlist (slack_allow), and the owner (slack_owner) if none is set.Without the app-level token, sessions can post but cannot receive replies.4
Invite the bot
In each channel you want sessions to use, run
/invite @<bot>. Set a default channel with mnemom agent config set slack_channel <channel id>.5
Launch a session with --slack
slack_listen = true has the same effect as passing the flag every time.mnemom agent slack logout removes both tokens from the store.
What —slack does
--slack does three things:
- It writes an MCP config for the session at
~/.mnemom/slack/mcp-<session>.json. That config runsmnemom agent slack listenas the servermnemom-slack. - It starts the router if one is not running.
- It launches Claude Code with that config and
--dangerously-load-development-channels server:mnemom-slack.
- Claude Code asks you to confirm when the session starts.
- On Team and Enterprise plans, an admin must turn on
channelsEnabledin managed settings.
--slack works in the terminal and remote-control shapes. It is not applied to a headless server, because the channel needs an interactive confirmation.
The channel server:
- checks the session’s inbox every second and shows each message to the model as a
<channel source="mnemom-slack">block; - does not replay messages routed before the session started listening, except messages held for it (see Aliases);
- gives the model three tools:
slack_reply(channel, text, thread_ts?)slack_delete(ts, channel?)slack_thread(channel, thread_ts), which reads a whole thread (up to 40,000 characters in total, 8,000 per message)
The router
--slack starts the router for you. You can also run it in the foreground:
- It needs the app-level token and Node 22 or later.
- Only one router runs per machine. Its pid is in
~/.mnemom/slack/router.pid. - It reconnects two seconds after a disconnect.
Who can reach a session
- Only senders whose Slack member ID is on
slack_allowreach a session. Messages from anyone else are dropped silently. With an empty allowlist, nothing is delivered. - Posts by apps, including this one, are never routed, so sessions do not hear each other.
How a message finds its session
Names match loosely:
- Case and punctuation are ignored.
- A name also matches the one live session whose name ends in
-<name>.
mnemom agent config set slack_sticky_threads true. A thread where you addressed a session then keeps routing replies to it for 30 days.
A thread reply carries the thread so far as context:
- each message is capped at 2,000 characters, and older replies are left out past 8,000 in total;
- messages in that context from people who are not on the allowlist are marked
(not on allowlist).
Aliases and held messages
Aliases are off by default. Turn them on withmnemom agent config set slack_aliases true.
Commands
A session posts under its own name, which the launcher sets, so it cannot post as another session. Link previews are off.
Durable sessions and the owner-only inbox
This part also needs the
durable experimental feature (see Durable sessions), and is still being finalised.durable on, a message routed to a locked durable session goes to that session’s durable inbox. It is not shown in a pane. The session gets it when it is next idle.
Who can send:
- The owner. Set your member ID with
mnemom agent config set slack_owner <id>. You can list several IDs, comma-separated, andMNEMOM_SLACK_OWNER_IDSadds more. The message is sent with the owner’s credential. - An agent the owner allows.
MNEMOM_SLACK_AGENT_SENDERSmaps a Slack ID to an environment variable that holds that agent’s key, as<slack id>=<ENV VAR>. The API accepts the message only if the owner put that agent on the session’s sender allowlist (mnemom agent sessions senders). - Anyone else gets a private note that the message was not sent.
slack_allow to get this far. If no owner ID is set, the router warns that your own messages to a locked session will not be sent.
The sender gets a private note when a message is queued or refused. A Slack message that is delivered twice is admitted once.
Answer an owner review from the thread
When a durable session is waiting on an Owner review question, the owner can answer it by replyingrelease or refuse in the session’s thread. Case does not matter, and a leading @handle is allowed. The reply answers the question instead of going to the inbox. Only owner IDs can answer this way.
If the answer fails, you get a private note. You can then reply again or run mnemom agent sessions answer <session> latest.
Settings
Set them with
mnemom agent config set <key> <value>. Member IDs look like U012ABCDEF.
See also
- Durable sessions
- CLI reference — experimental features