hermes - 💡(How to fix) Fix Cron delivery knowledge gap: agent cannot see messages sent to user

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…

Code Example

cron session → scheduler → platform adapter → user
RAW_BUFFERClick to expand / collapse

Problem

When a cron job fires and delivers a message to the user, the agent running in the current conversation session has zero visibility into what was delivered. The delivery pipeline goes:

cron session → scheduler → platform adapter → user

The conversation agent is completely blind to the delivered content. This causes:

  1. Confusion when users reference cron messages — The user says "stop that reminder" and the agent has to session_search to understand what was delivered.
  2. Misleading template text — The scheduler appends "To stop or manage this job..." unconditionally, even on one-time reminders that already self-deleted. The agent authored the prompt but never saw the wrapper/footer text.
  3. No feedback loop — Agent cannot verify what the user received, leading to blind assumptions.

Fixes Implemented (local)

  1. Conditional stop footer (cron/scheduler.py): "To stop or manage this job..." footer now only appears on recurring jobs (repeat=None or repeat>1 or repeat="forever"). One-time jobs (repeat=1) get clean delivery without confusing stop instructions.

  2. Delivery log (cron/scheduler.py): After successful delivery, a record is appended to ~/.hermes/cron/delivery_log.jsonl with timestamp, job_id, job_name, content_preview (500 chars), targets, and repeat status. Bounded to 50 entries.

  3. cronjob(action="delivery_log") tool: New action that reads the last 10 delivery log entries (most recent first) so the agent can query what was recently sent to the user.

  4. Tests: 6 new tests covering delivery log append, trim, content truncation, and the tool action.

Proposed Further Improvements

  • Auto-injection: On the next conversation turn after a cron delivery to the same chat, inject recent delivery summaries as context (similar to how memory is injected). This would eliminate the need for the agent to proactively call delivery_log.
  • Move footer into prompt: Instead of infrastructure appending wrappers, let the agent control wrapper text via the cron prompt itself. This way the agent sees and owns the full delivered message.

Files Changed

  • cron/scheduler.py — conditional footer, _log_delivery(), _delivery_log_path()
  • tools/cronjob_tools.pydelivery_log action, updated schema and description
  • tests/cron/test_scheduler.py — 6 new tests

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 Cron delivery knowledge gap: agent cannot see messages sent to user