Routines: allow quiet exit that skips the unread session list
Problem
Scheduled routines (cron-based remote agents) always create an unread session in the session list, even when the routine runs and finds nothing actionable to do. This creates noise — if you have a routine that polls for a condition and it's a no-op 90% of the time, you still accumulate unread sessions you have to manually dismiss.
Proposed solution
Add a mechanism for a routine to signal "nothing to report" so the resulting session doesn't appear as unread. Some possible shapes:
- A tool the routine can call (e.g.,
TaskOutputwith asilent: trueflag, or a dedicatedSilentExittool) - A convention where if the routine produces no output / exits without calling any tools, the session is auto-suppressed
- A flag on
CronCreatelikesuppressNoOp: truethat lets the routine author opt in
The hook system already has suppressOutput and exit-code semantics for controlling visibility — extending something similar to routines would be a natural fit.
Use case
I have routines that check for conditions periodically (e.g., "are there new items to process?"). Most runs find nothing and exit cleanly. The unread badge accumulates quickly and the session list fills with no-op runs that don't need attention.
Related
- #18544 (background task notification noise — closed as not planned, but the friction is similar)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗