Skip to content

Add DM (user_id) proactive-post support to send_discord_message #1025

@Aaronontheweb

Description

@Aaronontheweb

Summary

send_discord_message (added in #953) is channel-only — it posts to a Discord text channel and creates a thread off the message so user replies route back to a live session. It cannot proactively DM a Discord user. This issue tracks adding a user_id / DM target.

Why DM support was deferred

The proactive-post amnesia fix relies on the deferred thread-history hydration path: the bot's posted message becomes the thread root, and on the first authorized reply the binding actor fetches that root from Discord server-side history and adopts it as context (mirrors how send_slack_message works).

Discord DMs are a flat conversation with no distinct thread root. The thread-history-backfill capability already documents this — see its spec scenarios:

  • "Discord DM has no thread root, so no bot content hydrates from history"
  • "Discord DM never defers and never re-arms"

So a DM proactive post would route replies correctly (the DM channel id is a stable session key), but the bot's own posted message could not be recovered as context on the first reply — the proactive-post amnesia bug would remain open for DMs. Rather than ship a tool whose DM path has weaker context guarantees than its channel path, DM support was deferred.

What closing this needs

Either:

  1. A new context-recovery mechanism for flat conversations (e.g. seed the proactive session's transcript with the posted message at post time), or
  2. An explicitly-documented, accepted weaker guarantee for DM proactive posts.

Plus the tool surface (user_id parameter, DM channel opening) and ACL parity (AllowDirectMessages, AllowedUserIds) adapted to Discord.

Related

  • Add send_discord_message proactive-post tool #953send_discord_message proactive-post tool (channel-only)
  • OpenSpec change add-discord-proactive-postdesign.md "Decision: Channel-only scope — DM proactive posting deferred" records this rationale
  • openspec/specs/thread-history-backfill/spec.md — Discord DM limitation scenarios

Metadata

Metadata

Assignees

No one assigned

    Labels

    channelsDiscord, Slack, and other channels.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions