Objective
Add an early exit mechanism to the Hourly CI Cleaner workflow that skips execution when there is no work to do, preventing unnecessary token consumption.
Context
The Copilot Token Report (discussion #7407) recommends adding a no-op exit guard to the Hourly CI Cleaner. This will prevent the workflow from consuming tokens when there are no CI runs to clean up.
Approach
- Add a preliminary step that checks if there are CI runs to clean
- Use GitHub API to query for qualifying runs
- If no runs found, exit early with success status
- Document the no-op behavior in workflow comments
Implementation Strategy
Add an early check before the main Copilot agent execution:
steps:
- name: Check for CI runs to clean
id: check
run: |
# Query for qualifying CI runs
count=$(gh api ... | jq 'length')
echo "count=$count" >> $GITHUB_OUTPUT
- name: Run CI Cleaner
if: steps.check.outputs.count > 0
# ... existing Copilot agent execution
Files to Modify
- Hourly CI Cleaner workflow file (identified in previous issue)
Acceptance Criteria
Expected Impact
AI generated by Plan Command for discussion #7407
Objective
Add an early exit mechanism to the Hourly CI Cleaner workflow that skips execution when there is no work to do, preventing unnecessary token consumption.
Context
The Copilot Token Report (discussion #7407) recommends adding a no-op exit guard to the Hourly CI Cleaner. This will prevent the workflow from consuming tokens when there are no CI runs to clean up.
Approach
Implementation Strategy
Add an early check before the main Copilot agent execution:
Files to Modify
Acceptance Criteria
Expected Impact
Related to [plan] Address DeepReport Intelligence Briefing findings (Dec 23, 2025) #7410