openclaw - 💡(How to fix) Fix Multi-bot Discord: slash commands (/new, /model) only route to first bot account [1 comments, 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#63246Fetched 2026-04-09 07:56:22
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1

Root Cause

  • /new in Cyrus's channel → James responds with 'This channel is not allowed' (because James doesn't own that channel)
  • Cyrus's session never gets reset
  • This caused a session to bloat to 656k tokens / $174 in API costs because the user couldn't reset it

Fix Action

Workaround

Currently the only way to reset a non-default agent's session is to manually delete the session from the session store JSON file and restart the gateway. This is not viable for daily use.

RAW_BUFFERClick to expand / collapse

Problem

When running multiple Discord bot accounts (e.g., James + Cyrus), slash commands like /new, /model, and /status only work for the first (default) bot account. Using /new in Cyrus's channel resets James's session instead of Cyrus's.

Expected Behavior

Each Discord bot account should register its own slash commands. When a user types /new in a channel bound to Cyrus's bot, it should reset Cyrus's session, not James's.

Current Behavior

  • /new in Cyrus's channel → James responds with 'This channel is not allowed' (because James doesn't own that channel)
  • Cyrus's session never gets reset
  • This caused a session to bloat to 656k tokens / $174 in API costs because the user couldn't reset it

Setup

  • Two Discord bot accounts configured in channels.discord.accounts (default + cyrus)
  • Bindings correctly route: default → main agent, cyrus → cyrus agent
  • Both bots are connected and responding to normal messages
  • Gateway logs show 'native commands using Carbon reconcile path' twice (once per bot) on startup

Workaround

Currently the only way to reset a non-default agent's session is to manually delete the session from the session store JSON file and restart the gateway. This is not viable for daily use.

Environment

  • OpenClaw 2026.4.2
  • macOS
  • Discord channel with two bot accounts in same guild

extent analysis

TL;DR

The issue can be fixed by ensuring that each Discord bot account correctly handles its own slash commands, potentially by modifying the command handling logic to account for multiple bot instances.

Guidance

  • Verify that the channels.discord.accounts configuration is correctly set up for both the default and Cyrus bot accounts, and that the bindings are properly routing messages to their respective agents.
  • Check the command handling code to ensure that it can differentiate between the two bot accounts and their respective sessions, potentially by using the bot's ID or other identifying information.
  • Investigate the 'native commands using Carbon reconcile path' logs to see if they provide any insight into how the commands are being handled and why they are not being routed correctly to the intended bot account.
  • Consider adding logging or debugging statements to the command handling code to gain a better understanding of how the commands are being processed and where the issue is occurring.

Example

No code example is provided due to the lack of specific code details in the issue.

Notes

The issue seems to be related to the handling of multiple bot accounts and their respective sessions, but without more information about the code and its logic, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround by modifying the command handling logic to correctly handle multiple bot accounts, as upgrading to a fixed version is not mentioned as an option in the issue. This is recommended because the current workaround of manually deleting the session from the session store JSON file and restarting the gateway is not viable for daily use.

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