AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Sep 29, 2026, 10:00 JST

Claude Code job on GitHub Actions stayed green for 2.5 days

Claude Code job on GitHub Actions stayed green for 2.5 days

3 Key Points

  1. What happened

    A GitHub Actions job calling Claude Code on a schedule returned "You've hit your weekly limit" and exited in about 25 seconds, but all 8 consecutive runs from 9/18 to 9/21 showed green because `|| true` and the pipe's `tee` exit code masked the failure.

  2. Why it matters

    The job's runs looked successful on the surface — green in GitHub and finishing in about 25 seconds — so no failure email or alert fired and nobody knew the job had stalled for 2.5 days.

  3. What to watch

    Fixing this hinges on not treating "the command exited" as "work got done" — the author's corrections include capturing the real exit code with `set +e` and `pipefail`, and checking output length instead of trusting the exit code alone.

WHO IT HITSEngineers and small teams who run AI coding agents like Claude Code on schedulers such as GitHub Actions are exposed to silent stalls — the job keeps reporting green while producing nothing. Anyone relying on green status alone as proof of work may want to verify that output is actually being generated.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The stall ran from the night of 9/18 to the morning of 9/21. The author had already been burned by this pattern: on 9/10 a job returned "Not logged in" and stayed green, and on 9/11 a "session limit" message did the same. The response on 9/11 was to split failures into two types — authentication problems that need a human (red) and usage limits that resolve on their own (kept green). Usage limits were kept green to avoid alert fatigue, and the reason was written to a file that a separate watchdog was supposed to read.

The flaw was structural: the watchdog itself called Claude and ran inside the same weekly quota as the job it was watching, so when the limit hit, the role that was supposed to announce the stop stopped along with it. That watchdog also ran every two hours, 84 times a week, mostly concluding there was nothing waiting. The stop was discovered only by accident, while the author was doing something else and happened to open the history file.

The lesson the author draws is that the watchdog's job was placed on the same dependency as the thing it was meant to monitor. What the fix hinges on is separating the path that reports a stop from the path that stops — notifications now go out via curl without calling Claude, and a Python-only daily aggregation no longer depends on the quota. For anyone running similar scheduled agents, the benefit will depend on whether these paths are truly independent in practice.

FAQ
Why did the GitHub Actions job show green when Claude Code had actually stopped?
The `|| true` appended to the `claude -p` call turned the non-zero exit into success. Even without it, the pipe's exit code comes from `tee`, which usually succeeds, so the job stayed green.
How did the author finally notice the 2.5-day stop?
Not from an alert. While counting which models each Claude-calling path used on 9/21, the author opened the history in improve_blocked.json and saw 8 consecutive usage_limit records.
What did the author change to stop this kind of silent failure?
The fixes included capturing the real exit code with `set +e` and `pipefail`, sending notifications via curl so they don't depend on Claude, and counting output per run to warn when zero items are produced.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleTiny AI Arena pits AI models in battle game; claude-sonnet-5 leads