Get in Touch

AI triage agents that keep 51Degrees’ CI green 

The client

51Degrees provides device detection and IP intelligence that ad-tech and web platforms use at scale. Its engineering runs on more than 80 GitHub Actions workflows across dozens of repositories in .NET, Java, C/C++, Go, Node, Python and PHP. On top of those sits a nightly pipeline that builds and publishes the cloud service's daily image.

The challenge

With that many pipelines, some nightly build is red almost every morning. Most reds are not regressions. They come from flaky tests, runner hiccups, package mirror outages, or a new test running against yesterday's image. An engineer still had to open each failed run, dig through megabytes of logs, decide whether it was real, re-run it if it wasn't, and report back. That work was slow and repetitive, and it kept pulling senior people away from product work.

What we built

Postindustria built an agentic triage pipeline on Anthropic's Claude Code. It runs inside GitHub Actions:

Collect

It reads the CI dashboards to find every monitored workflow, and picks the newest run on each tracked branch.

Analyse

For each failure, it downloads the logs and starts a Claude agent. The agent explores the logs with shell tools, reads the relevant source and writes a short root-cause paragraph that links to the exact files and lines.

Decide

If the agent judges a failure flaky, it flags it, and the pipeline re-runs that job exactly once.

Escalate

If the re-run fails too, a second agent pass looks at the new logs, this time aiming for a concrete fix rather than another retry.

Report

One markdown report goes to the job summary, and a short summary is posted to the team's Slack.

The most important pipeline, the nightly cloud publish, isn't triaged on a timer. It sends an event the moment it finishes, so triage starts within minutes on exactly that run. Each target can also carry a “known context” file of documented failure modes, so the agent spots recurring issues instead of rediscovering them every day.

Safety by design

  • The agent never holds a GitHub credential. The parent process downloads logs and source, and strips tokens from the agent's environment.
  • The agent can't edit files. Its only write to GitHub is a single re-run. It posts no comments, opens no issues and pushes nothing.
  • Logs stay on the runner. The agent reads only the slices it needs, so whole logs are never sent to the model.

Results

  • Every morning, the agent triages more than 80 workflows across two dashboards before the team starts work.
  • In 100 nightly cloud-publish runs since July 2026, it caught 24 failures. 4 were flaky and fixed themselves after the automatic re-run, with nobody involved. The other 20 reached engineers with a root-cause analysis already written.
  • Engineers now start from a diagnosis, such as which keys and properties differed or which commit added the test, instead of from a raw log.
  • Running the agent for months exposed real data problems in the CI tooling (stale run listings from the GitHub API, cron-timing races), and these were fixed along the way.

The Technology

Stack: Python, GitHub Actions, Claude Code (headless), the GitHub REST API, Slack.