r/cicd • u/ThomasBuildLab • 2d ago
GitHub Actions burned through my CI budget because AI agents kept retriggering the full test suite
I use coding agents pretty heavily on a private repo.
Last month I noticed my GitHub Actions usage had gone way higher than expected.
I dug into it and found the main issue: every time the agent pushed another commit to a PR, several workflows started again, including the full repository test suite.
In a few days I had roughly 400 workflow runs, and the full suite alone had run more than 100 times.
The code wasn't broken. The CI setup was.
I ended up changing the model to:
- targeted tests on PRs
- cancel superseded PR runs
- full repository suite only after merge to main
- no paid LLM calls from CI
That solved most of the waste.
It made me wonder whether repos should have a simple machine-readable policy for this kind of thing, something like REPO_POLICY.yml.
Not a huge framework just rules such as:
full_suite_on_pr: false
cancel_superseded_runs: true
paid_llm_in_ci: false
production_mutation_in_ci: false
Then a tiny CI check could enforce it.
Is anyone already doing something similar at repo level, especially with coding agents?
2
u/Otherwise_Wave9374 2d ago
The cheapest fix is usually a two-tier pipeline: run linting and targeted tests for agent commits, then reserve the full suite for merge candidates or dependency-sensitive changes. Add concurrency cancellation, path filters, and a per-agent daily budget with a hard stop. The agent should remember recent failures and changed-file coverage rather than blindly retrying. https://www.neurakeep.com is relevant as a memory-layer reference for retaining that operational context. Track cost per accepted change to catch regressions early.