openclaw - 💡(How to fix) Fix Doctor auto-creates accounts.default in multi-account Discord setup, causing duplicate message delivery [6 comments, 3 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#52210Fetched 2026-04-08 01:14:15
View on GitHub
Comments
6
Participants
3
Timeline
8
Reactions
0
Author
Timeline (top)
commented ×6closed ×1locked ×1

Fix Action

Fix / Workaround

Current Workaround

Code Example

Moved channels.discord single-account top-level values into channels.discord.accounts.default.
RAW_BUFFERClick to expand / collapse

Problem

When using a multi-account Discord setup (e.g., main, xiami, shrimp-cracker — each with their own bot token), openclaw doctor and openclaw gateway restart automatically create an accounts.default entry every time they run.

The doctor log says:

Moved channels.discord single-account top-level values into channels.discord.accounts.default.

This happens even when:

  • All top-level single-account values have been manually removed
  • Only enabled: true remains at the top level (which seems schema-required)
  • Named accounts already exist with their own groupPolicy, guilds, streaming, etc.

Impact

The auto-created accounts.default shares the same bot token as accounts.main (since the main bot token is used at the top level). This causes duplicate message delivery — each incoming Discord message matches both the channel-specific binding (→ agent:main) and the implicit default account routing, resulting in the agent processing and responding to every message twice.

Steps to Reproduce

  1. Configure channels.discord.accounts with multiple named accounts (main, xiami, shrimp-cracker)
  2. Set up channel-specific bindings for each
  3. Remove all top-level single-account values except enabled
  4. Run openclaw gateway restart or openclaw doctor --fix
  5. Observe that accounts.default is recreated

Expected Behavior

In a multi-account setup, doctor should not create accounts.default if named accounts already exist. Or there should be a way to explicitly opt out of this migration.

Current Workaround

None fully effective. The accounts.default is recreated on every restart/doctor run.

Environment

  • OpenClaw version: latest (installed via Homebrew)
  • OS: macOS (Apple Silicon)
  • Discord config: 3 named accounts, each with unique bot token
  • Bindings: channel-specific (peer.kind=channel) only, no catch-all

extent analysis

Fix Plan

To prevent the auto-creation of accounts.default in a multi-account Discord setup, we need to modify the openclaw configuration and potentially patch the openclaw code.

Step-by-Step Solution

  1. Modify Discord Configuration: Ensure that all top-level single-account values are removed from the Discord configuration, except for enabled: true.
  2. Add Explicit Opt-Out: Add a new field createDefaultAccount: false at the top level of the Discord configuration to explicitly opt out of the default account creation.
channels:
  discord:
    enabled: true
    createDefaultAccount: false
    accounts:
      main:
        # main account config
      xiami:
        # xiami account config
      shrimp-cracker:
        # shrimp-cracker account config
  1. Patch OpenClaw Code (if necessary): If the above configuration change does not work, you may need to patch the openclaw code to respect the createDefaultAccount field. You can do this by modifying the openclaw source code and rebuilding the package.

Verification

To verify that the fix worked, run openclaw doctor and openclaw gateway restart and check that accounts.default is not recreated. You can also test the Discord integration to ensure that duplicate message delivery is no longer occurring.

Extra Tips

  • Make sure to backup your configuration files before making any changes.
  • If you are using a version control system, commit your changes and track any updates to the openclaw package.
  • Consider submitting a pull request to the openclaw repository to add support for the createDefaultAccount field.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Doctor auto-creates accounts.default in multi-account Discord setup, causing duplicate message delivery [6 comments, 3 participants]