hermes - 💡(How to fix) Fix [Feature]: Cron: allow per-job opt-in to send_message tool [1 comments, 2 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
NousResearch/hermes-agent#20140Fetched 2026-05-06 06:38:28
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Root Cause

Cron jobs that need to actively send messages to specific channels (e.g., a WhatsApp/Discord/Slack group) cannot do so because the cron runner:

Fix Action

Fix / Workaround

The current workaround is agents falling back to curl against platform bridge APIs directly. This bypasses all framework safety layers (rate limiting, chunking, platform auth), is fragile and platform-specific, and wastes tokens while the agent searches for alternative send methods.

There is no clean workaround within the framework. enabled_toolsets on the job config cannot override disabled_toolsets — the disabled list is always applied as the final subtraction step in model_tools.py _compute_tool_definitions().

Code Example

{
  "name": "daily-group-report",
  "allow_messaging": true,
  "deliver": "origin",
  "prompt": "Generate the report and send it to the group chat using send_message..."
}

---

_job_disabled = ["cronjob", "clarify"]
if not job.get("allow_messaging"):
    _job_disabled.append("messaging")
disabled_toolsets=_job_disabled,
RAW_BUFFERClick to expand / collapse

Problem or Use Case

Cron jobs that need to actively send messages to specific channels (e.g., a WhatsApp/Discord/Slack group) cannot do so because the cron runner:

  1. Hard-disables the messaging toolset (disabled_toolsets=["cronjob", "messaging", "clarify"] in cron/scheduler.py:1045)
  2. Injects a system instruction telling the agent not to use send_message (cron/scheduler.py:744)

This makes sense for the common case where deliver handles everything. But it creates a gap for a legitimate use case: cron jobs that need to send formatted messages to a channel different from the deliver target, while keeping deliver for execution summaries.

The current workaround is agents falling back to curl against platform bridge APIs directly. This bypasses all framework safety layers (rate limiting, chunking, platform auth), is fragile and platform-specific, and wastes tokens while the agent searches for alternative send methods.

There is no clean workaround within the framework. enabled_toolsets on the job config cannot override disabled_toolsets — the disabled list is always applied as the final subtraction step in model_tools.py _compute_tool_definitions().

Proposed Solution

Add a per-job opt-in field allow_messaging that re-enables the messaging toolset for specific cron jobs:

{
  "name": "daily-group-report",
  "allow_messaging": true,
  "deliver": "origin",
  "prompt": "Generate the report and send it to the group chat using send_message..."
}

When allow_messaging: true:

  1. Remove "messaging" from disabled_toolsets for this job
  2. Skip injecting the "do NOT use send_message" preamble for this job
  3. Keep "cronjob" and "clarify" disabled (recursion guard and no-op for cron)

Backward compatible — default behavior is unchanged.

Implementation sketch in cron/scheduler.py run_job():

_job_disabled = ["cronjob", "clarify"]
if not job.get("allow_messaging"):
    _job_disabled.append("messaging")
disabled_toolsets=_job_disabled,

And conditionally adjust the cron_hint preamble to skip the "do NOT use send_message" line when allow_messaging is true.

Alternatives Considered

  1. Multi-target deliver (#13469) — Letting deliver accept an array of targets. This solves multi-destination but doesn't cover cases where the agent needs to compose different messages per target (e.g., a detailed report to a group, a one-line summary to DM). The two proposals are complementary.

  2. enabled_toolsets escape hatch — Setting enabled_toolsets: ["messaging"] per job. Doesn't work because disabled_toolsets is always applied as a final subtraction step (by design, see model_tools.py:369).

  3. Global cron platform config — Enabling messaging for all cron jobs via hermes tools per-platform config. Too broad — most cron jobs don't need send_message, and enabling it globally re-introduces the risk the restriction was designed to prevent.

Feature Type

Gateway / messaging improvement

Scope

Small (single file, < 50 lines)

extent analysis

TL;DR

Add an allow_messaging field to the job configuration to opt-in for enabling the messaging toolset for specific cron jobs.

Guidance

  • Review the proposed solution and consider adding the allow_messaging field to the job configuration to enable the messaging toolset for specific cron jobs.
  • Update the cron/scheduler.py file to conditionally remove "messaging" from disabled_toolsets and skip injecting the "do NOT use send_message" preamble when allow_messaging is true.
  • Test the updated implementation to ensure that the messaging toolset is correctly enabled for jobs with allow_messaging: true.
  • Consider the alternatives proposed, such as multi-target deliver or enabled_toolsets escape hatch, and evaluate their feasibility for the specific use case.

Example

_job_disabled = ["cronjob", "clarify"]
if not job.get("allow_messaging"):
    _job_disabled.append("messaging")
disabled_toolsets=_job_disabled,

Notes

The proposed solution is backward compatible and only affects jobs with the allow_messaging field set to true. The implementation is relatively small and contained within a single file.

Recommendation

Apply the proposed workaround by adding the allow_messaging field to the job configuration and updating the cron/scheduler.py file. This solution addresses the specific use case of cron jobs needing to send formatted messages to a channel different from the deliver target while keeping deliver for execution summaries.

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

hermes - 💡(How to fix) Fix [Feature]: Cron: allow per-job opt-in to send_message tool [1 comments, 2 participants]