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

@ -194,7 +194,10 @@ DELIVERY OPTIONS (where output goes):
- "telegram:123456": Send to specific chat (if user provides ID)
NOTE: The agent's final response is auto-delivered to the target — do NOT use
send_message in the prompt. Just have the agent compose its response normally.
send_message in the prompt for that same destination. Same-target send_message
calls are skipped so the cron doesn't double-message the user. Put the main
user-facing content in the final response, and use send_message only for
additional or different targets.
Use for: reminders, periodic checks, scheduled reports, automated maintenance.""",
"parameters": {