Skip to content

[Feature]: Message Delivery Failure Notification #46830

@sunxzycn

Description

@sunxzycn

Summary

When sending messages to channels (Feishu, Telegram, etc.), if the API call fails (network issues, rate limits, API errors), the agent may believe the message was sent successfully, but the user never receives it.

Observed behavior (from logs):

feishu[default] final reply failed: AxiosError: Request failed with status code 400
code: 230011, msg: 'The message was withdrawn.'
code: 231003, msg: 'The message is not found, maybe not exist or deleted'
getaddrinfo ENOTFOUND open.feishu.cn

The agent continues operating under the assumption that delivery succeeded, leading to user confusion ("I already sent that" vs "I never received it").

Problem to solve

Option A: System Message Injection (Recommended)

When a channel delivery fails, inject a system message into the agent's context:

{
  "type": "delivery_failure",
  "channel": "feishu",
  "target": "user:xxx",
  "error": "AxiosError: Request failed with status code 400",
  "timestamp": "2026-03-14T18:27:07.554Z",
  "message_preview": "First 100 chars of failed message..."
}

This allows the agent to:

  1. Know delivery failed
  2. Retry or inform the user
  3. Log to memory for recovery

Option B: Delivery Status in Tool Response

Return delivery status in message tool response:

{
  "status": "failed",
  "error": "network_error",
  "retry_suggested": true
}

Proposed solution

  1. Reliability: Agents can detect and recover from delivery failures
  2. Trust: Users won't experience "I sent it" / "I never got it" disconnects
  3. Debugging: Easier to trace message delivery issues

Alternatives considered

No response

Impact

Daily review reports, important notifications, time-sensitive messages where delivery confirmation matters.

Evidence/examples

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions