Bug Description
Cron jobs configured with deliver: whatsapp are silently dropped. The agent runs, output is saved to ~/.hermes/cron/output/<id>/, jobs.json marks the job successful, but no WhatsApp message is ever sent and nothing is logged about the failed delivery.
The gateway adapter and the send_message tool path both honor WHATSAPP_HOME_CHANNEL correctly — direct sends work fine. The failure is isolated to the cron scheduler.
Root Cause
cron/scheduler.py defines _HOME_TARGET_ENV_VARS (around line 99), the dict the cron resolver uses to look up each platform's home-channel env var. Every messaging platform is in there except whatsapp:
matrix, telegram, discord, slack, signal, mattermost, sms, email,
dingtalk, feishu, wecom, weixin, bluebubbles, qqbot
So _resolve_home_env_var("whatsapp") returns "", _get_home_target_chat_id("whatsapp") returns "", and _resolve_delivery_targets({"deliver": "whatsapp"}) returns []. The caller treats "no targets" as a no-op rather than a failure, so nothing surfaces.
Reproduction
- Set
WHATSAPP_HOME_CHANNEL=<jid>@s.whatsapp.net in ~/.hermes/.env.
hermes gateway restart. Verify direct delivery works (e.g. via the send_message tool with target=whatsapp).
- Schedule a cron job with
deliver: whatsapp, schedule 1m.
- Wait. The job runs, output is saved on disk,
jobs.json marks success — but no WhatsApp message arrives and agent.log shows no delivered to whatsapp:... line.
Programmatic repro
from cron.scheduler import _resolve_delivery_targets
job = {"id": "x", "name": "x", "deliver": "whatsapp"}
print(_resolve_delivery_targets(job)) # [] — should resolve one target
Fix
One-line addition in cron/scheduler.py:
_HOME_TARGET_ENV_VARS = {
...
"qqbot": "QQBOT_HOME_CHANNEL",
"whatsapp": "WHATSAPP_HOME_CHANNEL", # add
}
After this, the resolver returns the configured channel and the existing delivery path works end-to-end (verified locally with multiple successful cron pings to a WhatsApp self-chat).
PR to follow.
Environment
- macOS 26.3
- Hermes at
~/.hermes/hermes-agent, current main (a7e7921)
- WhatsApp self-chat mode, gateway running via launchd
Bug Description
Cron jobs configured with
deliver: whatsappare silently dropped. The agent runs, output is saved to~/.hermes/cron/output/<id>/,jobs.jsonmarks the job successful, but no WhatsApp message is ever sent and nothing is logged about the failed delivery.The gateway adapter and the
send_messagetool path both honorWHATSAPP_HOME_CHANNELcorrectly — direct sends work fine. The failure is isolated to the cron scheduler.Root Cause
cron/scheduler.pydefines_HOME_TARGET_ENV_VARS(around line 99), the dict the cron resolver uses to look up each platform's home-channel env var. Every messaging platform is in there exceptwhatsapp:So
_resolve_home_env_var("whatsapp")returns"",_get_home_target_chat_id("whatsapp")returns"", and_resolve_delivery_targets({"deliver": "whatsapp"})returns[]. The caller treats "no targets" as a no-op rather than a failure, so nothing surfaces.Reproduction
WHATSAPP_HOME_CHANNEL=<jid>@s.whatsapp.netin~/.hermes/.env.hermes gateway restart. Verify direct delivery works (e.g. via thesend_messagetool withtarget=whatsapp).deliver: whatsapp, schedule1m.jobs.jsonmarks success — but no WhatsApp message arrives andagent.logshows nodelivered to whatsapp:...line.Programmatic repro
Fix
One-line addition in
cron/scheduler.py:After this, the resolver returns the configured channel and the existing delivery path works end-to-end (verified locally with multiple successful cron pings to a WhatsApp self-chat).
PR to follow.
Environment
~/.hermes/hermes-agent, currentmain(a7e7921)