Skip to content

[Bug]: Announce delivery posts raw error JSON to channels when cron run fails #42243

@sercada

Description

@sercada

Summary

When a cron job fails (e.g., provider returns 500) and delivery.mode: "announce", the raw error text is delivered to the configured Discord/Telegram channel as if it were normal content. Users see JSON error dumps in their task channels.

Steps to reproduce

  1. Create a cron job with delivery.mode: "announce" targeting a Discord channel
  2. Set the model to a provider experiencing intermittent failures (e.g., OpenAI Codex during a 500 outage)
  3. Wait for the cron to fire and fail

Expected behavior

Error runs should NOT be delivered to the channel. The error should be logged internally and visible via cron runs but not posted to the user-facing channel.

Actual behavior

The error text is delivered as a message to the configured channel:

Codex error: {"type":"error","error":{"type":"server_error","code":"server_error","message":"An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists."}}

Workaround

Setting delivery.bestEffort: true suppresses the error delivery. But the default behavior (without bestEffort) posts error dumps.

Suggestion

  • Failed runs (lastRunStatus: "error") should never trigger announce delivery, regardless of bestEffort
  • Or at minimum, bestEffort should default to true for announce delivery

Environment

  • OpenClaw v2026.3.8
  • Ubuntu 24.04 x64
  • Channel: Discord
  • Cron model: openai-codex/gpt-5.4 (Codex subscription via OAuth)
  • 4 consecutive failures observed before workaround applied

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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