-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Feature]: Persistent outbox queue for outbound message reliability #14725
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
When the gateway restarts (SIGUSR1, crash, or manual restart) during an active agent turn, any outbound messages that haven't been delivered yet are lost. This is because the current outbound delivery pipeline is entirely in-memory.
Current Behavior
- Agent generates a reply
- Reply is queued in memory for delivery to Slack/Telegram/etc.
- If gateway restarts between steps 2 and 3 → message is lost
- User sees the agent "go silent" with no indication of what happened
Proposed solution
Implement a persistent outbox queue:
- Before sending: Write outbound messages to a local file/SQLite (e.g.,
~/.openclaw/outbox/) - After confirmed delivery: Remove from outbox
- On startup: Check outbox for unsent messages and retry delivery
- Optional: Configurable retry count and backoff
Why This Matters
- Slack Socket Mode has no built-in retry for bot-initiated messages (only for event acknowledgments)
- Gateway restarts are common during config changes (SIGUSR1)
- Users lose trust when messages disappear silently
Alternatives considered
I've implemented a manual patch that wraps the delivery pipeline with file-based persistence, but it breaks on every OpenClaw update and requires re-patching bundled files. A native solution would be far more reliable.
Additional context
This is especially important for Slack Socket Mode users, where outbound messages use the Web API (not the socket) and have no delivery guarantee across restarts.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.