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

  1. 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).
  2. The only way to stop that breaks the permission relay. Emptying the top-level allowFrom makes a session ignore DMs while still serving its group channel. But permission requests are sent only to access.allowFrom DMs (server.ts, permission_request handler), and the button handler also checks access.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's allowFrom for the button and "yes " replies.
  • Or separate "who may DM this session" from "who receives permission prompts" (for example, a permissionRecipients list).

Environment

Plugin 0.0.4, Claude Code 2.1.284, Windows 11.

Source: anthropics/claude-plugins-official