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

@ -141,6 +141,13 @@ PLATFORM_HINTS = {
"is preserved for threading. Do not include greetings or sign-offs unless "
"contextually appropriate."
),
"cron": (
"You are running as a scheduled cron job. Your final response is automatically "
"delivered to the job's configured destination, so do not use send_message to "
"send to that same target again. If you want the user to receive something in "
"the scheduled destination, put it directly in your final response. Use "
"send_message only for additional or different targets."
),
"cli": (
"You are a CLI AI Agent. Try not to use markdown but simple text "
"renderable inside a terminal."