fix: suppress duplicate cron sends to auto-delivery targets

Allow cron runs to keep using send_message for additional destinations, but
skip same-target sends when the scheduler will already auto-deliver the final
response there. Add prompt/tool guidance, docs, and regression coverage for
origin/home-channel resolution and thread-aware comparisons.
This commit is contained in:
teknium1
2026-03-14 19:07:50 -07:00
parent fa89b65230
commit 7b140b31e6
8 changed files with 295 additions and 32 deletions

View File

@@ -79,7 +79,7 @@ When scheduling jobs, you specify where the output goes:
**How platform names work:** When you specify a bare platform name like `"telegram"`, Hermes first checks if the job's origin matches that platform and uses the origin chat ID. Otherwise, it falls back to the platform's home channel configured via environment variable (e.g., `TELEGRAM_HOME_CHANNEL`).
The agent's final response is automatically delivered — you do **not** need to include `send_message` in the cron prompt.
The agent's final response is automatically delivered — you do **not** need to include `send_message` in the cron prompt for that same destination. If a cron run calls `send_message` to the exact target the scheduler will already deliver to, Hermes skips that duplicate send and tells the model to put the user-facing content in the final response instead. Use `send_message` only for additional or different targets.
The agent knows your connected platforms and home channels — it'll choose sensible defaults.