Skip to content

[Bug] Cron delivery.announce fails with 'Unsupported channel: discord' even though plugin is loaded #12769

@samratjha96

Description

@samratjha96

Summary

Cron jobs with delivery.mode: announce and delivery.channel: discord fail with Unsupported channel: discord even when the Discord plugin is loaded and functioning for other operations.

Environment

  • OpenClaw version: 2026.2.6-3
  • OS: Linux 6.8.0-90-generic (x64)
  • Node: v22.21.0

Steps to Reproduce

  1. Create a cron job with isolated session and Discord delivery:
openclaw cron add \
  --name "Test Cron" \
  --cron "0 15 * * *" \
  --session isolated \
  --message "Test message" \
  --announce \
  --channel discord \
  --to "1458652710915276885"
  1. Run the job: openclaw cron run <jobId>

  2. Check run history: openclaw cron runs --id <jobId>

Expected Behavior

The job should run and deliver the output to the Discord channel.

Actual Behavior

  • The agent runs successfully and generates output (~69 seconds, real content produced)
  • Delivery fails with: error: "Unsupported channel: discord"
  • The Discord plugin shows as loaded in openclaw plugins list
  • Manual sends via openclaw message send --channel discord ... work fine
  • Cron jobs targeting the same channel but using the messaging tool internally succeed

Evidence

{
  "status": "error",
  "error": "Unsupported channel: discord",
  "summary": "[Agent successfully generated content here]",
  "durationMs": 69302
}

Meanwhile:

$ openclaw plugins list | grep discord
│ Discord      │ discord  │ loaded   │ ...

Analysis

The error originates from src/infra/outbound/targets.ts line ~130:

const plugin = getChannelPlugin(params.channel);
if (!plugin) {
  return {
    ok: false,
    error: new Error(\`Unsupported channel: ${params.channel}\`),
  };
}

This suggests getChannelPlugin('discord') returns undefined in the cron delivery code path, even though the plugin is loaded. This is similar to the fixed issue #1327 where CLI commands had the same problem due to plugin registry not being loaded in certain code paths.

Workaround

Have the agent send the message directly using the discord/message tool in the prompt, bypassing the delivery mechanism.

Possibly Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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