Skip to content

Add send_discord_message proactive-post tool #953

@Aaronontheweb

Description

@Aaronontheweb

Summary

Discord channel has no proactive-post tool. The agent can respond to inbound Discord messages, but it cannot start a new Discord conversation on its own (e.g., from a scheduled reminder, or in response to a user request in another channel: "let Bob know about this").

Slack has send_slack_message for this purpose (src/Netclaw.Channels.Slack/Tools/SendSlackMessageTool.cs). Discord needs an equivalent.

What's missing

src/Netclaw.Channels.Discord/ has no Tools/ directory and no NetclawTool-decorated proactive-post tool. As a result:

  • DeliveryKind.Channel / DeliveryKind.None reminders that target a Discord audience cannot be delivered (the agent has no tool to call).
  • Cross-channel agent-initiated outreach to Discord is impossible.

Acceptance criteria

A new SendDiscordMessageTool (or equivalently-named) that:

  • Posts a new message creating a new conversation (DM or channel), analogous to SlackOutboundClient.PostNewThreadAsync.
  • Wires the resulting Discord conversation into the actor hierarchy so user replies route back to a live session, analogous to StartProactiveThread / SlackThreadBindingActor.
  • Honors the upcoming channel-session-bootstrap conformance spec (in progress) — specifically: the new session's transcript must contain the posted message as its first assistant turn before the tool's success is acknowledged. This is necessary to avoid the same amnesia bug recently identified for Slack, where user replies to a proactive thread hit a session with no transcript and the LLM only sees "adopted memories."
  • Includes ACL parity with SendSlackMessageTool (allowed-channel checks, DM toggle, etc.) adapted to Discord semantics.

Context

Surfaced during investigation in branch investigate/reminder-thread-context while debugging session amnesia on user replies to Slack reminder messages. The conformance spec is being drafted as a separate OpenSpec change so any new channel proactive-post tool (Discord first, others later) lands on the same contract.

Related

  • src/Netclaw.Channels.Slack/Tools/SendSlackMessageTool.cs — reference implementation
  • src/Netclaw.Channels.Slack/SlackIngressMessages.csStartProactiveThread / ProactiveThreadAck shape to mirror
  • Upcoming OpenSpec change: channel-session-bootstrap conformance (forthcoming)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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