Skip to content

Fix scheduling pre-step to exit cleanly when no programs are due - #28

Merged
mrjf merged 2 commits into
mainfrom
copilot/fix-scheduling-pre-step-exit
Apr 4, 2026
Merged

Fix scheduling pre-step to exit cleanly when no programs are due#28
mrjf merged 2 commits into
mainfrom
copilot/fix-scheduling-pre-step-exit

Conversation

CopilotAI commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

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 existing no_programs: true early-exit pattern
  • Added not_due flag to the /tmp/gh-aw/autoloop.json sentinel so the agent step can explicitly distinguish "nothing to do" from "program selected"
  • Documented not_due in the agent instructions section alongside the existing JSON contract fields
constnotDue=!selected&&unconfigured.length===0;constresult={selected: selected,// ...no_programs: false,not_due: notDue,};

Error exits (process.exit(1)) for forced-program-not-found, forced-program-unconfigured, and unhandled exceptions are unchanged.

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>
CopilotAI changed the title [WIP] Fix scheduling pre-step to exit successfully when no programs are dueFix scheduling pre-step to exit cleanly when no programs are dueApr 4, 2026
CopilotAI requested a review from mrjfApril 4, 2026 05:06
@mrjf
mrjf marked this pull request as ready for review April 4, 2026 14:21
@mrjf
mrjf merged commit a2ccf62 into mainApr 4, 2026
13 of 15 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduling pre-step: sys.exit(1) fails workflow noisily when no programs are due

2 participants

@mrjf