Skip to content

fix(channels): extend user-visible error fallback to Discord, Slack, Signal, WhatsApp #60812

Description

@garnetlyx

Problem

When a message dispatch fails (provider error, rate limit, empty response), Telegram now sends the user a meaningful fallback message. All other channels silently drop the failure — the user receives nothing and has no way to know something went wrong.

Current behavior per channel

Channel On dispatch error
Telegram Sends user a typed fallback message (rate limit / empty response / general) ✅
LINE Sends a hardcoded "Sorry, I encountered an error..." string (no error routing) ⚠️
Discord Logs only — user sees nothing ❌
Slack Logs only — user sees nothing ❌
Signal Logs only — user sees nothing ❌
WhatsApp (web) Logs only — user sees nothing ❌

Proposed fix

Add the same fallback pattern to each channel's dispatch site:

  1. Track lastError via onError callback and outer try/catch
  2. Check delivery state after dispatch (nothing delivered + failure/skip)
  3. Send a user-visible message using resolveFailoverReasonFromError + EmptyResponseError routing (same logic as Telegram)

Extract the error-message-selection logic into a shared helper (e.g. src/auto-reply/reply/delivery-fallback.ts) so it isn't duplicated across channel files.

Related

  • Introduced in the model-fallback empty-response fix PR (see EmptyResponseError in src/agents/model-fallback.ts)
  • resolveFailoverReasonFromError already handles rate-limit / auth / timeout classification

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions