Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

CI Cleaner workflow was succeeding but producing no safe outputs, triggering false failure issues. Root cause: check_ci_status job silently failed (couldn't run gh CLI without repo checkout), and agent lacked instructions to call noop when CI passes.

Changes

check_ci_status job:

  • Added actions/checkout step before gh run list command
  • Added contents: read permission

Agent instructions:

  • Added explicit "Check CI Status First" section
  • When ci_status: success, call noop tool and exit immediately
  • Applied to both .github/workflows/hourly-ci-cleaner.md prompt and .github/agents/ci-cleaner.agent.md

Context

The workflow's if: needs.check_ci_status.outputs.ci_needs_fix == 'true' gate wasn't working because the check job failed with:

failed to determine base repo: fatal: not a git repository (or any of the parent directories): .git

This left ci_needs_fix undefined, causing unpredictable behavior. Even when it worked, the agent never produced safe outputs when CI was passing.

Original prompt

This section details on the original issue you should resolve

<issue_title>[agentics] CI Cleaner failed</issue_title>
<issue_description>### Workflow Failure

Workflow: CI Cleaner
Branch: main
Run URL: https://github.com/githubnext/gh-aw/actions/runs/21506393373

⚠️ No Safe Outputs Generated: The agent job succeeded but did not produce any safe outputs. This typically indicates:

  • The safe output server failed to run
  • The prompt failed to generate any meaningful result
  • The agent should have called noop to explicitly indicate no action was taken

Action Required

Debug this workflow failure using the agentic-workflows agent:

/agent agentic-workflows

When prompted, instruct the agent to debug this workflow failure.

Generated from CI Cleaner

  • expires on Feb 6, 2026, 6:32 AM UTC

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 30, 2026 06:43
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add checkout step to check_ci_status job so gh CLI can access repo
- Add contents:read permission to check_ci_status job
- Update CI cleaner agent to check CI status first and call noop if passing
- Update workflow prompt to clearly instruct agent to call noop if CI is passing

Fixes issue where workflow succeeded but produced no safe outputs because:
1. check_ci_status job couldn't determine repository (missing checkout)
2. Agent didn't call noop when CI was passing (no explicit instruction)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug CI Cleaner workflow failure Fix CI Cleaner: Add repo checkout and noop handling for passing CI Jan 30, 2026
Copilot AI requested a review from pelikhan January 30, 2026 06:49
@pelikhan
Copy link
Contributor

@copilot merge main

Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot merge main

The branch is already up to date with main. No merge was needed.

@pelikhan pelikhan marked this pull request as ready for review January 30, 2026 06:57
@pelikhan pelikhan merged commit f0a2ecd into main Jan 30, 2026
147 checks passed
@pelikhan pelikhan deleted the copilot/debug-ci-cleaner-failure branch January 30, 2026 06:57
Sign up for free to 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.

[agentics] CI Cleaner failed

2 participants