iMessage plugin: permission_request broadcasts to all allowlisted DMs instead of self-chat only

Resolved 💬 2 comments Opened Mar 29, 2026 by adri8n Closed Mar 29, 2026

Bug

The permission_request notification handler in the iMessage channel plugin (server.ts ~line 565) sends permission prompts to every allowlisted DM, not just the owner's self-chat.

What happens

  1. Claude Code emits a permission_request notification (e.g. for a Bash or Write tool call)
  2. The handler collects handles from access.allowFrom plus SELF addresses
  3. It resolves each handle to chat GUIDs via qChatsForHandle
  4. It sends the permission prompt text to all resolved chats

This means every contact in allowFrom receives internal permission request messages like:

🔐 Permission request [xxxxx] Bash: Create channels/imessage directory Reply "yes xxxxx" to allow or "no xxxxx" to deny

Expected behavior

Permission requests should only be sent to the owner's self-chat — not to DMs with other contacts. The self-chat is where the owner interacts with Claude; broadcasting permission prompts to other people is a privacy leak and confusing UX.

Suggested fix

In the permission_request handler, resolve only SELF handles (not allowFrom), and further filter to chats where every participant is also a SELF address (true self-chat):

const candidates = new Set<string>()
for (const h of SELF) {
  for (const { guid } of qChatsForHandle.all(h)) candidates.add(guid)
}
const targets = new Set<string>()
for (const guid of candidates) {
  const participants = qChatParticipants.all(guid)
  if (participants.length > 0 && participants.every(p => SELF.has(p.id.toLowerCase()))) {
    targets.add(guid)
  }
}

Environment

  • macOS, Claude Code with iMessage channel plugin
  • dmPolicy: "allowlist" with multiple contacts in allowFrom

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗