Slack

Reading and answering a Slack DM

Read what someone wrote to the account on Slack and answer it in matt's voice, on the account's own session, with no browser.

How the owner asks for it: "read the messages with <someone> on slack", "reply to <someone> on slack", "what did <someone> say in <workspace>"

Run it from a fresh context

Say: "go on docs/useCases/slack/dmReply.md for <someone>". The agent reads this page and runs the steps.

The steps

#StepToolDone when
0The account is known: a local row with its d cookielocalAccount { action: "list" }; if missing, the owner runs log slack cookies save --account <name> in a terminalthe account is listed
1Session check, and which workspaces it is inslackSessionCheck, then slackWorkspacesloggedIn, with the workspace's domain
2Find the chat by who it is withslackChats { account, workspace }one DM or group with that person
3Read the chatslackRead { account, workspace, chat, limit }their latest message and what came before it
4Pull how matt writes to them, then draft only from facts matt gavevoice { to, with, context } (no text)a draft that answers what they asked
5Gate the draftvoice { to, with, context, text }it passes
6Send it, one message per lineslackSendLive { account, workspace, chat, text, approvedBy: "matt", confirmLive: true }Slack answers each line with its ts
7Tell the owner what they said and what went outthe reply to the ownerboth quoted with their times

New messages arrive by themselves: the inbox hook keeps log slack watch --inbox open for every signed-in account and puts each new DM, group message or mention in front of the agent (>>> NEW SLACK MESSAGE).

What the runs taught

  • Read the chat before sending. The voice gate inside slackSendLive reads the chat's context from the .db, not from Slack (rule 137). slackRead stores what it reads there as backfill, so step 3 is what gives the gate the chat's history. On 2026-11-04 a thank-you to Archie was refused three times while the .db held only 2 of his messages, and the gate read it as a cold first message with an ask in it. Backfilled history is never shown as new messages.
  • Send by who it is with. Give chat as the person ("archie"), not only the D… id, so the gate matches matt's history with them by name.
  • Don't stack messages on a chat matt already answered. When matt's own messages are the newest in the chat (he has already said thanks), a third message is refused as not his voice, and it reads like it. Answer it with a reaction instead (slackReactLive, inbox/reactions), or leave it. The 🙏 on Archie's "sent u £20" went out this way.