[BUG] Claude Code exhausted GitHub Actions monthly allotment (2,000 min) in a single session

Resolved 💬 2 comments Opened Jun 6, 2026 by 2006GTO Closed Jul 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Date: 2026-06-06
Session context: Merging open PRs on a private repo. I asked Claude Code to merge clean PRs and fix CI failures.
What happened:
Claude Code applied a 1-line lint fix (src/lib/injuryStatus.ts) to 13 separate PR branches via cherry-pick, pushing to each branch multiple times across 3 rounds of fixes. Each push to a PR branch triggers a full CI suite (lint, typecheck, pgtap, claude-review — 4 jobs per push).
Estimated runs triggered: ~150+ workflow runs, consuming approximately 2,000 GitHub Actions minutes — the full monthly free allotment — in under 3 hours.
Root cause (Claude’s own assessment): The correct approach was to fix the issue once on a dedicated branch, merge to main, and let all PRs inherit the fix via rebase — 1 CI run instead of 150+. Claude Code chose a brute-force multi-branch approach without considering CI cost.
Financial impact:
• Monthly GitHub Actions allotment exhausted: ~2,000 minutes
• GitHub account-level Actions block triggered (including self-hosted runners)
• Spent time setting up a self-hosted runner as a workaround
Resolution needed:
Credit toward GitHub Actions minutes or equivalent compensation for the usage caused by Claude Code’s operations.
Evidence: Available in the session transcript if requested

What Should Happen?

Ideally, a few things:
Claude Code should know what CI costs before pulling the trigger. Before pushing to multiple branches, it should estimate how many runs that triggers, check the account’s remaining Actions balance via the GitHub API, and warn — or stop — if the blast radius is significant. “This will trigger 52 CI runs consuming ~400 minutes. You have 800 remaining this month. Proceed?” That’s a one-API-call check I never made.
There should be a built-in blast radius limit. Claude Code shouldn’t be able to push to more than 2-3 branches in a session without explicit confirmation. The equivalent of a spending limit inside the agent itself.
The fix-on-main pattern should be the default, not a guardrail I learned after the damage. When a bug affects N open PRs, Claude Code should default to “fix main once, rebase PRs” — not “fix each branch individually.” That’s an architectural preference that should be baked in, not something a user has to teach mid-session.
Anthropic should have a cost remediation path. If Claude Code demonstrably causes infrastructure costs through its own mistakes — not the user’s instructions — there should be a clear, fast process to make it right. Not just a GitHub issue that may or may not get attention. A direct path to a credit.
The self-hosted runner setup should be a first-session recommendation. Before any CI-intensive work on a private repo, Claude Code should flag “you’re on GitHub-hosted runners with a 2,000 min/month limit — want me to set up a self-hosted runner first?” That’s a 20-minute setup that makes everything else free.

Error Messages/Logs

Steps to Reproduce

Listed above already

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code 2.1.165

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗