fix(cron): suppress delivery when [SILENT] appears anywhere in response#5654
Merged
teknium1 merged 1 commit intoNousResearch:mainfrom Apr 6, 2026
Merged
Conversation
Previously the scheduler checked startswith('[SILENT]'), so agents that
appended [SILENT] after an explanation (e.g. 'N items filtered.\n\n[SILENT]')
would still trigger delivery.
Change the check to 'in' so the marker is caught regardless of position.
Add test_silent_trailing_suppresses_delivery to cover this case.
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.
Problem
The scheduler checked
startswith('[SILENT]')to suppress delivery, but agents sometimes append[SILENT]after an explanation rather than responding with it alone:This caused the message to be delivered despite the intent to suppress it.
Fix
Changed
startswith(SILENT_MARKER)toSILENT_MARKER in ...so the marker is caught regardless of its position in the response.Test
Added
test_silent_trailing_suppresses_deliverytoTestSilentDelivery— covers the case where[SILENT]is appended after content rather than leading the response.