discord: multiple sessions sharing one bot token all answer DMs; permission prompts can only go to DMs
Author: tk344Created Sep 29, 2026Updated Sep 29, 2026
Setup
Several claude --channels plugin:discord@claude-plugins-official sessions run at once (one per project),
sharing one bot token, each with its own DISCORD_STATE_DIR and a different guild channel in access.groups.
Problem
- Every session answers each DM. DMs are delivered to all connected sessions, so one DM from an allowlisted user gets N replies (one per running session).
- The only way to stop that breaks the permission relay. Emptying the top-level
allowFrommakes a session ignore DMs while still serving its group channel. But permission requests are sent only toaccess.allowFromDMs (server.ts,permission_requesthandler), and the button handler also checksaccess.allowFrom. So that session can no longer relay permission prompts at all. (dmPolicy: 'disabled'is not an alternative because of #956.)
Suggestion
Any of these would make multi-session setups workable:
- Let a session relay permission prompts to its group channel(s) (for example, a per-group
permissionRelay: true), checking the group'sallowFromfor the button and "yes " replies. - Or separate "who may DM this session" from "who receives permission prompts" (for example, a
permissionRecipientslist).
Environment
Plugin 0.0.4, Claude Code 2.1.284, Windows 11.
Source: anthropics/claude-plugins-official