From a2cf5e4051467aa2e67233c0596cad87a8138d30 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 05:02:25 +0000 Subject: [PATCH 1/2] Initial plan From 2c3b7b918b842a9191e34c100bba8204e29f7a10 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 05:05:41 +0000 Subject: [PATCH 2/2] fix: exit cleanly when no programs are due in scheduling pre-step 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> --- workflows/autoloop.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workflows/autoloop.md b/workflows/autoloop.md index 3a8dc7f..52c94a7 100644 --- a/workflows/autoloop.md +++ b/workflows/autoloop.md @@ -541,6 +541,7 @@ steps: issueProgramsMap[name] = info.issue_number; } + const notDue = !selected && unconfigured.length === 0; const result = { selected: selected, selected_file: selectedFile, @@ -551,6 +552,7 @@ steps: skipped: skipped, unconfigured: unconfigured, no_programs: false, + not_due: notDue, }; fs.mkdirSync('/tmp/gh-aw', { recursive: true }); @@ -564,7 +566,7 @@ steps: if (!selected && unconfigured.length === 0) { console.log('\nNo programs due this run. Exiting early.'); - process.exit(1); // Non-zero exit skips the agent step + process.exit(0); } } @@ -653,6 +655,7 @@ The pre-step has already determined which program to run. Read `/tmp/gh-aw/autol - **`unconfigured`**: Programs that still have the sentinel or placeholder content. - **`skipped`**: Programs not due yet based on their per-program schedule. - **`no_programs`**: If `true`, no program files exist at all. +- **`not_due`**: If `true`, programs exist but none are due for this run. If `selected` is not null: 1. Read the program file from the `selected_file` path.