fix(cron): include whatsapp in _HOME_TARGET_ENV_VARS - #22998
Closed
dhruv-saxena wants to merge 1 commit into
Closed
dhruv-saxena wants to merge 1 commit into
dhruv-saxena wants to merge 1 commit into
Conversation
Cron jobs using `deliver: whatsapp` were silently dropped because the resolver's home-channel env var dict in cron/scheduler.py listed every messaging platform except whatsapp. _resolve_delivery_targets() returned [] and no message was sent — but jobs.json marked the run successful and no log line surfaced the failure. The gateway adapter and the send_message tool path both honored WHATSAPP_HOME_CHANNEL correctly; only the cron path missed. Adds 'whatsapp' -> 'WHATSAPP_HOME_CHANNEL' to _HOME_TARGET_ENV_VARS. Verified end-to-end with multiple cron pings landing in WhatsApp self-chat after the fix. Fixes NousResearch#22997
This was referenced May 10, 2026
Contributor
|
Same root cause and same one-line fix as #23067 (which I just closed in favor of this one — filed 2 hours earlier). The fix is correct. The only addition worth considering: the |
This was referenced May 10, 2026
Collaborator
|
Merged via PR #24659 (cherry-picked onto current main with your authorship preserved). Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cron jobs configured with
deliver: whatsappwere silently dropped — the agent ran, output was saved,jobs.jsonmarked success, but no WhatsApp message was sent and no error was logged.Root cause:
cron/scheduler.pydefines_HOME_TARGET_ENV_VARS, the dict the cron resolver uses to look up each platform's home-channel env var. Every messaging platform was in there exceptwhatsapp(matrix, telegram, discord, slack, signal, mattermost, sms, email, dingtalk, feishu, wecom, weixin, bluebubbles, qqbot — but no whatsapp). So_resolve_delivery_targets({"deliver": "whatsapp"})returned[], and the caller treats "no targets" as a no-op.The gateway adapter and the
send_messagetool path both already honoredWHATSAPP_HOME_CHANNELcorrectly — direct sends worked fine. Only the cron path missed.Change
One-line addition to
_HOME_TARGET_ENV_VARS:Verification
Before the fix:
After:
End-to-end: scheduled three successive
deliver: whatsappcron pings (1 minute each) — all landed in the WhatsApp self-chat after this patch was applied to a running gateway. Before the patch, none arrived.Fixes #22997