openclaw - 💡(How to fix) Fix Cron delivery reports success but WeChat message never arrives (session-guard.ts suspected) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72550Fetched 2026-04-28 06:34:37
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

  • Bug hypothesis: The cron delivery system catches the exception from ssertSessionActive() but still marks the job as delivered: true, i.e. the error is swallowed instead of propagated

Root Cause

Possible Root Cause

Fix Action

Workaround

Daily manual re-send after 08:30 CST, once the 1-hour pause has expired.

RAW_BUFFERClick to expand / collapse

Problem

Cron jobs configured with delivery announce (openclaw-weixin channel) report delivered: true in run logs, but users never receive the WeChat messages. Manual re-send via the same channel succeeds.

Frequency: Every morning for 3 consecutive days (Apr 21, 24, 25, 27).

Environment

  • OpenClaw version: unknown (latest)
  • Channel plugin: openclaw-weixin
  • Cron jobs: 3 jobs (weather at 07:00, horoscope at 08:00, tech news at 09:00), all configured with:
    • sessionTarget: isolated
    • payload.kind: agentTurn
    • delivery.mode: announce
    • delivery.channel: openclaw-weixin
    • delivery.accountId: <bot-account-id>
    • delivery.to: <wechat-user-id>@im.wechat

Steps to Reproduce

  1. Ensure WeChat session token expires overnight (around 00:00 CST)
  2. Wait for morning cron jobs (07:00-09:00 CST)
  3. Check cron run logs → status: ok, delivered: true, deliveryStatus: delivered
  4. Check WeChat → no messages received

Expected Behavior

If WeChat API call fails, the delivery should be marked as failed, not delivered.

Actual Behavior

cron run timestampstatusdelivereddeliveryStatus
2026-04-25 07:00 (weather)oktruedelivered
2026-04-25 08:00 (horoscope)oktruedelivered
2026-04-25 09:00 (tech news)oktruedelivered

Manual re-send 2 hours later → message arrives successfully.

Possible Root Cause

species/session-guard.ts implements a 1-hour pause mechanism:

  • When WeChat API returns errcode -14 (session expired), pauseSession(accountId) blocks all outbound API calls for 60 minutes
  • Morning cron deliveries call ssertSessionActive() which throws during pause period
  • Bug hypothesis: The cron delivery system catches the exception from ssertSessionActive() but still marks the job as delivered: true, i.e. the error is swallowed instead of propagated

Relevant code paths:

  • session-guard.ts → ssertSessionActive() throws during pause
  • channel.ts → sendWeixinOutbound() calls ssertSessionActive()
  • Cron delivery layer (in dist/delivery-outbound.runtime-*.js) likely wraps the outbound call in a try/catch that does not translate exceptions into failed delivery status

Workaround

Daily manual re-send after 08:30 CST, once the 1-hour pause has expired.

References

  • Related code: species/session-guard.ts, species/channel.ts
  • Delivery runtime: dist/delivery-outbound.runtime-DhiC4aqN.js
  • Full debug log: (can provide if needed)

Reported by OpenClaw AI assistant (SUSU) on behalf of user.

extent analysis

TL;DR

The cron delivery system likely swallows exceptions from assertSessionActive(), causing jobs to be marked as delivered even when the WeChat API call fails due to a session expiration.

Guidance

  • Investigate the cron delivery layer in dist/delivery-outbound.runtime-*.js to verify if it catches exceptions from assertSessionActive() without propagating the error.
  • Check the session-guard.ts and channel.ts code paths to confirm the bug hypothesis.
  • Consider implementing a retry mechanism for cron deliveries that fail due to session expiration.
  • Review the daily manual re-send workaround to determine if it can be automated or if a more robust solution is needed.

Example

No code snippet is provided as the issue does not contain sufficient information to create a concrete example.

Notes

The provided information suggests a specific bug hypothesis, but further investigation is needed to confirm the root cause. The daily manual re-send workaround may not be a long-term solution and should be reviewed for automation or replacement with a more robust fix.

Recommendation

Apply workaround: Daily manual re-send after 08:30 CST, once the 1-hour pause has expired, until a more robust solution can be implemented. This is because the workaround has been shown to be effective in delivering the messages successfully after the pause period expires.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Cron delivery reports success but WeChat message never arrives (session-guard.ts suspected) [1 participants]