Skip to content

Discord turns can be missed or finish silently across gateway restart/recovery on 2026.6.10 #98081

Closed as not planned

Description

@raawmarkus

Draft: Discord turns and cron jobs lost around gateway restarts

Environment

  • OpenClaw: 2026.6.10 stable
  • Runtime: Docker Desktop on macOS, Linux container arm64
  • Node: 24.16.0 inside container
  • Channel: Discord bot
  • Agent: Penny
  • Discord status during checks: enabled, configured, running, connected
  • Config validation: valid, no warnings
  • Group visible replies: messages.groupChat.visibleReplies = "automatic"
  • Affected no-mention channels have requireMention: false

Summary

Penny is online and Discord-connected, but gateway/container restarts correlate with missed or delayed Discord turns and lost cron/recovery tasks. From the user perspective, the bot appears to ignore a message until it is mentioned/reminded again.

This does not appear to be a basic Discord routing config issue. Channel probe passes, the affected channels are configured for no-mention replies, and normal replies work outside the restart window.

Current Evidence

From ./OpenClaw/oc reliability-check --since 24h --no-save:

  • Penny restart count increased from 23 to 40.
  • Penny has restart-recovery log lines in the window.
  • Peach also had a restart-count increase, but Penny is the user-visible issue.

From openclaw tasks audit --json:

  • 5 warnings total.
  • 4 lost tasks.
  • 1 delivery_failed task.
  • Lost tasks include Morning Briefing, AI X List Briefing Watchdog, heartbeat recovery, and OpenClaw X List Briefing Watchdog.

From focused logs on 2026-06-30:

  • Gateway restarted around 2026-06-30T04:07Z, 04:35Z, 04:40Z, and 05:00Z.
  • Restart recovery resumed interrupted heartbeat sessions around 04:35Z and 04:40Z.
  • Delivery recovery reported a failed pending Discord delivery with state send_attempt_started and refused blind replay without adapter reconciliation.
  • Morning Briefing and Morning Briefing Podcast had to be repaired after scheduled runs were interrupted by gateway restarts.

From the later 2026-06-30 user-message incident:

  • Penny restarted at 2026-06-30T07:22:03.116Z.
  • Discord provider started at 2026-06-30T07:22:06.733Z.
  • A no-mention user message in an allowed #penny thread was posted at 2026-06-30T07:22:11.537Z.
  • Discord channels resolved at 2026-06-30T07:22:14.073Z; Discord client initialized at 2026-06-30T07:22:14.450Z.
  • The message is visible through Discord REST afterwards, but the corresponding OpenClaw session did not update and no visible bot reply followed.

From a separate same-window thread:

  • A direct-mention user request in an allowed #travel thread was posted at 2026-06-30T07:21:12.993Z.
  • OpenClaw started the correct Discord group session at 2026-06-30T07:21:15Z.
  • Restart recovery resumed that same session at 2026-06-30T07:22:13Z.
  • The session ended successfully around 2026-06-30T07:25:22Z.
  • The requested work was completed locally.
  • Session JSONL and Docker logs contain final assistant text, but Discord REST reads of the thread and parent channel showed no visible bot reply after the user's request.
  • The only Discord message tool action in the recovered session evidence was read, not a send/post action.

Older Reproduction Markers

  • In a Discord travel thread on 2026-06-28, the user sent a follow-up message at 09:19 CEST. The visible bot reply did not arrive until the user mentioned the bot again at 09:34 CEST. This happened during the Penny gateway restart window around 2026-06-28T07:19Z and 07:22Z.
  • In an X private-list thread on 2026-06-28, gateway restart recovery resumed an interrupted session twice. Local logs/transcripts show model completion, but the visible Discord final reply was not found in the thread.
  • In Health on 2026-06-28, restart recovery failed with transcript tail is not resumable, and the user had to resend.

What Was Ruled Out

  • Penny was not OOM-killed in the current lifecycle.
  • Docker storage is not near exhaustion.
  • Discord probe reports connected/working.
  • Config validation passes.
  • This is not explained by requireMention for the relevant channels.
  • openclaw tasks maintenance --json preview did not recover/prune the lost tasks.

Local Mitigation Tried

The installation had three heavy X-list jobs all scheduled at 05:00 and all three watchdogs at 05:30. These were staggered with native openclaw cron edit to reduce concurrent cron pressure:

  • AI X: 05:00
  • OpenClaw X: 05:25
  • A X: 05:50
  • AI watchdog: 06:35
  • OpenClaw watchdog: 07:00
  • A watchdog: 07:25

This is only mitigation. It does not prove the restart/recovery delivery issue is fixed.

Local Detection Added

The host-side reliability monitor was hardened so this does not require full manual forensics every time:

  • discord-startup-readiness-gap: reports the interval between container/gateway start and Discord client initialization.
  • task-audit-delivery_failed: turns nonzero openclaw status task-audit counts into warnings.
  • recovered-discord-final-delivery-unverified: inspects recent Discord group session evidence and warns when a recovered session ended successfully with final assistant text but no Discord message-send action in the session evidence.

On 2026-06-30, this caught the known incident:

  • Discord client initialized 11.3s after Penny container start.
  • Penny task audit still reported 1 delivery_failed.
  • The recovered travel-thread session ended successfully with final assistant text, but session evidence contained only Discord read actions.

Requested Guidance

Please confirm whether this matches known 2026.6.x Discord restart/recovery issues, especially:

  • Final reply completion without visible Discord delivery.
  • Pending delivery stuck at send_attempt_started.
  • Inbound Discord events during gateway restart/reconnect not producing timely turns.
  • Lost cron/recovery tasks with backing session missing.
  • Whether gateway restart --safe or gateway.reload.deferralTimeoutMs should be configured differently in Docker-based installs.
  • Whether Discord events posted after gateway process start but before Discord client readiness are expected to be replayed or intentionally dropped.
  • What native diagnostic should prove whether automatic final delivery was attempted, skipped, or failed after a recovered session ends successfully.

Possibly Related Existing Issues

Local redacted bundle available with command outputs and focused logs.

Activity

  1. clawsweeper commented on Jun 30, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

    The broad 2026.6.10 report has been overtaken by shipped restart, Discord reconnect, delivery, and task-recovery work; the meaningful remaining pre-readiness inbound-loss behavior is already tracked by the open canonical catch-up issue.

    Root-cause cluster
    Relationship: duplicate
    Canonical: #55792
    Summary: The remaining observable pre-readiness inbound loss is already owned by the open catch-up issue; other reported symptoms are shipped or separately owned delivery-contract work.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Canonical path: Keep the shipped durable recovery and Discord reconnect paths, resolve bounded missed-inbound catch-up in #55792, and resolve final visible-delivery outcomes in #87561.

    So I’m closing this here and keeping the remaining discussion on #55792 and #87561.

    Review details

    Best possible solution:

    Keep the shipped durable recovery and Discord reconnect paths, resolve bounded missed-inbound catch-up in #55792, and resolve final visible-delivery outcomes in #87561.

    Do we have a high-confidence way to reproduce the issue?

    No, there is no high-confidence live reproduction against current main in this review. The source contract still identifies the never-admitted readiness window, while the report provides strong historical 2026.6.10 evidence and the canonical catch-up issue describes the same observable path.

    Is this the best way to solve the issue?

    Yes. Closing this broad mixed report while preserving its evidence through the focused canonical inbound and final-delivery issues is narrower and more maintainable than keeping a third overlapping recovery tracker.

    Security review:

    Security review: This is issue triage without a proposed patch or security-sensitive report.

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • steipete: Authored and merged the shipped Discord failed-RESUME recovery repair with live fault-injection proof. (role: recent Discord recovery author and merger; confidence: high; commits: abbd5ae3ea73, 5fdd7d2; files: extensions/discord/src/internal/gateway.ts, extensions/discord/src/internal/gateway.test.ts, extensions/discord/src/monitor/provider.lifecycle.test.ts)
    • zhangguiping-xydt: Credited on shipped recovery work distinguishing accepted replies from genuinely unsent retryable deliveries across restart or recovery failure. (role: recent delivery-recovery contributor; confidence: medium; files: src/infra/outbound, src/gateway)
    • vincentkoc: Recent release history credits broad Gateway, channel-delivery, and recovery integration work across the affected owner boundaries. (role: recent adjacent Gateway and channel contributor; confidence: medium; files: src/gateway, src/infra/outbound, extensions/discord)

    Codex review notes: model internal, reasoning high; reviewed against ccb251c570be.

  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 30, 2026
  3. openclaw-barnacle commented on Jul 15, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  4. m13v commented on Jul 16, 2026

    @m13v

    the config check and the discord probe both verify what the install declares, and both come back green. what decides whether the turn lands is adapter state during the readiness window, and a probe that only runs once the client is up can't see the gap it just skipped.

  5. removed
    maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.
    on Jul 17, 2026
  6. locked as resolved and limited conversation to collaborators on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.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