docs(cron): warn self-sending no_agent scripts to use deliver: local - #82799
Open
ericcaiwx-star wants to merge 1 commit into
Open
docs(cron): warn self-sending no_agent scripts to use deliver: local#82799ericcaiwx-star wants to merge 1 commit into
ericcaiwx-star wants to merge 1 commit into
Conversation
Author
Scripts that already call a messaging API (e.g. multi-part Weixin reports) should not also use deliver: origin, or Hermes posts stdout again after the run. That second push is often unwanted and can fail independently of the script's own successful sends. Co-authored-by: Cursor <cursoragent@cursor.com>
cursor
Bot
force-pushed
the
docs/cron-self-send-deliver-local
branch
from
August 26, 2026 13:09
96598f6 to
acafacb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
no_agentscripts which already call a messaging API themselves must usedeliver: local, otherwise Hermes also posts script stdout to the chat target after the run.Why
In production we had a Weixin daily-report script that already sent text + Excel via
send_weixin_direct. The cron job still useddeliver: origin, so after a successful script run Hermes attempted a second stdout delivery. That second push failed with iLinkret=-2 errmsg=prepare failed(often mislabeled as rate limit; see #80125 / #80426) and pollutedlast_delivery_error, even though the user-facing report had already been delivered.This is not a scheduler bug —
deliver: originis working as designed for the common case where stdout is the message. The missing piece was docs for the self-sending script pattern.Test plan
#scripts-that-already-send-messages-themselvesresolves from the cron feature page linkMade with Cursor