[Feature]: add a fast channel-native memory clear command for Telegram/Discord
#6150 opened on Apr 27, 2026
Description
Summary
Add a quick channel-native way to clear memory from Telegram, Discord, and similar channels, such as /clear.
Problem statement
When using ZeroClaw through chat channels, clearing conversational memory or session context is currently awkward. The user has to rely on agent interpretation, CLI commands, or manual memory operations outside the channel. That is slow and easy to get wrong when the goal is a simple “forget this conversation” or “reset my context” action.
For channel-driven use, this is a common operation. The current behavior is insufficient because the fastest interface available to the user is the chat channel itself, but there is no obvious channel-native command for memory reset.
Proposed solution
Add a lightweight channel-native command such as /clear for Telegram, Discord, and similar interactive chat channels.
Preferred first-iteration behavior:
/clearclears the current conversation/session memory for that channel/user/thread scope.- The command returns a clear confirmation message in-channel.
- The command bypasses normal LLM interpretation and routes directly to a runtime/channel handler.
- The scope should be explicit and conservative by default: clear only the active session/thread unless the user invokes a broader variant later.
Possible extensions after v1:
/clear all/clear memory/clear session/clear confirm
Non-goals / out of scope
- No broad deletion of all stored memory across the entire agent in v1.
- No destructive bulk memory wipe without an explicit confirmation flow.
- No new web UI in the first iteration.
- No attempt to unify every channel’s slash-command UX in the first pass if some integrations need simpler text-command fallbacks.
Alternatives considered
- Continue using CLI-only memory clearing commands outside the chat channel.
- Ask the agent in natural language to forget/reset context.
- Use memory tool operations manually through prompts.
These alternatives are slower, less predictable, and less discoverable than a direct channel command.
Acceptance criteria
- A user on Telegram or Discord can issue a simple channel command to clear the active session/context quickly.
- The command executes without going through normal LLM reasoning.
- The runtime defines and documents the exact clear scope.
- The command returns a visible in-channel confirmation.
- Regression tests cover at least one supported channel and verify that only the intended scope is cleared.
Architecture impact
Likely affects:
crates/zeroclaw-channels/for channel command handlingcrates/zeroclaw-runtime/for session/memory clear semanticscrates/zeroclaw-memory/depending on how scoped deletion is implemented- docs for channel command reference and memory behavior
Risk and rollback
Main risk is over-broad deletion if the clear scope is ambiguous. The first version should default to the narrowest useful scope and require explicit confirmation for anything broader.
Rollback is straightforward if implemented as a channel command path: disable/remove the command handler or revert the change.
Breaking change?
No
Data hygiene checks
- I removed personal/sensitive data from examples, payloads, and logs.
- I used neutral, project-focused wording and placeholders.