openclaw - 💡(How to fix) Fix /new and /reset should support @agent targeting in multi-agent channels [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#43750Fetched 2026-04-08 00:17:31
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants
RAW_BUFFERClick to expand / collapse

Problem

In multi-agent Discord setups, /new and /reset slash commands are ambiguous — all agents registered in the channel respond to them. There is also no way to target a specific agent.

Observed behavior:

  • User runs /new in a shared channel → multiple agents (e.g. Forge + Anvil) both start new sessions
  • User runs /new in an agent's direct channel (e.g. #forge) → the wrong agent (Anvil) responds
  • /reset appears to respect channel blocking, but /new does not (inconsistency)

Proposed behavior

  1. Targeted reset: /new @AgentName or /reset @AgentName — only the mentioned agent resets
  2. Smart default (no target specified):
    • Reset the agent with the highest context % in that channel
    • OR reset all agents that have been actively participating in the current conversation thread
  3. Channel gating parity: /new should respect the same requireMention / channel blocking rules as /reset — currently inconsistent

Environment

  • OpenClaw multi-agent setup (main + anvil agents)
  • Discord channel with both agents active (requireMention: false)
  • Slash commands appear to bypass per-channel requireMention configuration entirely

Impact

In multi-agent setups, any user can accidentally (or intentionally) reset the wrong agent's context. Makes session management in shared channels unreliable.

extent analysis

Fix Plan

To resolve the ambiguity issue with /new and /reset slash commands in multi-agent Discord setups, we need to implement the following steps:

  • Update the command handlers to respect the requireMention configuration
  • Introduce targeted reset using @AgentName mentions
  • Implement smart default behavior for resetting agents without a target

Code Changes

# Update command handlers to respect requireMention
if not interaction.channel.permissions_for(bot.user).mention_everyone and not interaction.data.get('mention'):
    await interaction.response.send_message("Please mention the agent you want to interact with.")
    return

# Targeted reset using @AgentName mentions
if interaction.data.get('options'):
    agent_name = interaction.data.get('options')[0].value
    agent = next((a for a in agents if a.name == agent_name), None)
    if agent:
        # Reset the targeted agent
        await agent.reset()
        await interaction.response.send_message(f"Reset {agent_name} agent.")
        return

# Smart default behavior for resetting agents without a target
context_agents = [a for a in agents if a.context_percent > 0.5]
if context_agents:
    for agent in context_agents:
        await agent.reset()
    await interaction.response.send_message("Reset agents with high context percentage.")
else:
    await interaction.response.send_message("No agents found with high context percentage.")

Verification

To verify the fix, test the following scenarios:

  • Run /new in a shared channel without mentioning an agent → only agents with high context percentage should respond
  • Run /new @AgentName in a shared channel → only the mentioned agent should respond
  • Run /reset in a shared channel without mentioning an agent → only agents with high context percentage should reset
  • Run /reset @AgentName in a shared channel → only the mentioned agent should reset

Extra Tips

  • Ensure that the requireMention configuration is properly set for each channel
  • Consider implementing a cooldown period for resetting agents to prevent abuse
  • Monitor the behavior of the agents in shared channels to ensure the fix is working as expected

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 /new and /reset should support @agent targeting in multi-agent channels [1 participants]