-
Notifications
You must be signed in to change notification settings - Fork 0
Scheduling pre-step: sys.exit(1) fails workflow noisily when no programs are due #27
Copy link
Copy link
Open
Description
Problem
When no programs are due for a scheduled run, the scheduling pre-step exits with sys.exit(1) (line 456 of .github/workflows/autoloop.md):
if not selected and not unconfigured:
print("\nNo programs due this run. Exiting early.")
sys.exit(1) # Non-zero exit skips the agent stepThis causes the workflow run to show as failed (red X) in the Actions UI, even though "no programs due" is a normal, expected outcome for scheduled runs. On a 6-hour schedule, most runs will have nothing to do — each one creates a noisy failure notification.
Proposed fix
Exit successfully and gate the agent step on an output flag instead:
- Write a sentinel to
/tmp/gh-aw/autoloop.jsonindicating no programs are selected (similar to the existingno_programscase on line 268-269 which already usessys.exit(0)). - Have the agent step check the sentinel and skip itself when there's nothing to run.
This keeps "no programs due" as a quiet success while still preventing the agent from running unnecessarily.
Origin
Flagged by Copilot code review on github/gh-aw#24345.
File to change
.github/workflows/autoloop.md — scheduling pre-step, currently line ~456.
Reactions are currently unavailable