Fix scheduling pre-step to exit cleanly when no programs are due#28
Draft
Fix scheduling pre-step to exit cleanly when no programs are due#28
Conversation
Change process.exit(1) to process.exit(0) when no programs are due for a scheduled run. The non-zero exit was causing the workflow to show as failed (red X) in the Actions UI even though "no programs due" is an expected outcome. Also add a `not_due` flag to the JSON sentinel written to /tmp/gh-aw/autoloop.json so the agent step can explicitly detect this case, and document it in the agent instructions. Agent-Logs-Url: https://github.com/githubnext/autoloop/sessions/4d303a41-1658-4db8-bd17-24f7ed43d323 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix scheduling pre-step to exit successfully when no programs are due
Fix scheduling pre-step to exit cleanly when no programs are due
Apr 4, 2026
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.
The scheduling pre-step exits with
process.exit(1)when no programs are due, causing every idle scheduled run to show as a failed workflow (red X) in the Actions UI. On a 6h schedule, most runs have nothing to do — this is normal, not an error.Changes
process.exit(1)→process.exit(0)for the "no programs due" path, matching the existingno_programs: trueearly-exit patternnot_dueflag to the/tmp/gh-aw/autoloop.jsonsentinel so the agent step can explicitly distinguish "nothing to do" from "program selected"not_duein the agent instructions section alongside the existing JSON contract fieldsError exits (
process.exit(1)) for forced-program-not-found, forced-program-unconfigured, and unhandled exceptions are unchanged.