openclaw - 💡(How to fix) Fix [Bug]: Discord channel config rejects channel-level agentId and can abort gateway reload [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62455Fetched 2026-04-08 03:04:07
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

On OpenClaw 2026.4.5, if agentId is added under a Discord channel entry at channels.discord.guilds.<guildId>.channels.<channelId>, config reload becomes invalid and the gateway can abort with Unrecognized key: "agentId".

This is easy to hit when trying to route one Discord channel to a specific agent. The supported routing path appears to be bindings[] with match.channel = "discord" and peer.kind = "channel", but the invalid channel-level config shape is not self-healing and the runtime guidance is minimal.

Root Cause

On OpenClaw 2026.4.5, if agentId is added under a Discord channel entry at channels.discord.guilds.<guildId>.channels.<channelId>, config reload becomes invalid and the gateway can abort with Unrecognized key: "agentId".

This is easy to hit when trying to route one Discord channel to a specific agent. The supported routing path appears to be bindings[] with match.channel = "discord" and peer.kind = "channel", but the invalid channel-level config shape is not self-healing and the runtime guidance is minimal.

Code Example

{
  channels: {
    discord: {
      guilds: {
        "<guildId>": {
          channels: {
            "<channelId>": {
              requireMention: false,
              agentId: "video"
            }
          }
        }
      }
    }
  }
}

---

channels.discord.guilds.<guildId>.channels.<channelId>: Unrecognized key: "agentId"

---

config reload skipped (invalid config): channels.discord.guilds.<guildId>.channels.<channelId>: Unrecognized key: "agentId"
Gateway aborted: config is invalid.
channels.discord.guilds.<guildId>.channels.<channelId>: Unrecognized key: "agentId"
Fix the config and retry, or run "openclaw doctor" to repair.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On OpenClaw 2026.4.5, if agentId is added under a Discord channel entry at channels.discord.guilds.<guildId>.channels.<channelId>, config reload becomes invalid and the gateway can abort with Unrecognized key: "agentId".

This is easy to hit when trying to route one Discord channel to a specific agent. The supported routing path appears to be bindings[] with match.channel = "discord" and peer.kind = "channel", but the invalid channel-level config shape is not self-healing and the runtime guidance is minimal.

Steps to reproduce

  1. Start from a valid Discord config on OpenClaw 2026.4.5.
  2. Add a channel entry like this:
{
  channels: {
    discord: {
      guilds: {
        "<guildId>": {
          channels: {
            "<channelId>": {
              requireMention: false,
              agentId: "video"
            }
          }
        }
      }
    }
  }
}
  1. Let the gateway hot-reload or restart the gateway.

Expected behavior

One of these should happen:

  • channel-level agentId is supported, or
  • config validation fails with an actionable migration hint pointing to the supported bindings[] shape for per-channel agent routing, or
  • openclaw doctor --fix can repair or rewrite the unsupported config automatically.

Actual behavior

Config reload is skipped as invalid, and the gateway can abort with:

channels.discord.guilds.<guildId>.channels.<channelId>: Unrecognized key: "agentId"

Observed in local logs on April 7, 2026:

config reload skipped (invalid config): channels.discord.guilds.<guildId>.channels.<channelId>: Unrecognized key: "agentId"
Gateway aborted: config is invalid.
channels.discord.guilds.<guildId>.channels.<channelId>: Unrecognized key: "agentId"
Fix the config and retry, or run "openclaw doctor" to repair.

OpenClaw version

2026.4.5

Operating system

macOS

Install method

npm global

Model

N/A

Provider / routing chain

N/A

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Relevant docs/examples show per-channel Discord routing via bindings[], for example a Discord binding with peer: { kind: "channel", id: "..." }, rather than channels.discord.guilds...channels...agentId.

That suggests the current failure mode is a config-surface mismatch / usability trap rather than simply user typo.

Impact and severity

A single unsupported key under Discord channel config can break hot reload and abort the gateway until the config is repaired.

Additional information

If the intended behavior is "use bindings, never channel.agentId", it would help if validation/doctor returned a migration hint that explicitly says that.

lobster-biscuit

extent analysis

TL;DR

Remove the agentId key from the Discord channel entry in the config to fix the invalid config reload issue.

Guidance

  • Verify that the agentId key is the cause of the issue by removing it from the config and checking if the gateway reloads successfully.
  • Use the supported bindings[] shape for per-channel agent routing instead of adding agentId under the Discord channel entry.
  • Run openclaw doctor to check for any other config issues and potentially repair the config automatically.
  • Consider adding a migration hint to the config validation to point users towards the supported bindings[] shape for per-channel agent routing.

Example

{
  bindings: [
    {
      match: { channel: "discord" },
      peer: { kind: "channel", id: "<channelId>" },
      agentId: "video"
    }
  ]
}

Notes

The current failure mode is likely due to a config-surface mismatch, and providing a migration hint during config validation could help users avoid this issue in the future.

Recommendation

Apply workaround: Remove the agentId key from the Discord channel entry and use the supported bindings[] shape for per-channel agent routing, as this is the recommended configuration shape according to the documentation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One of these should happen:

  • channel-level agentId is supported, or
  • config validation fails with an actionable migration hint pointing to the supported bindings[] shape for per-channel agent routing, or
  • openclaw doctor --fix can repair or rewrite the unsupported config automatically.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING