Fix red CI with the OpenSRE agent
OpenSRE is a self-hosted CLI agent that reads a failed CI run, measures what unreliable CI costs, and pushes a fix to the pull request branch for you to review.
TL;DR
OpenSRE is an open-source CLI agent for CI/CD reliability. Install it, run opensre, and describe the problem in plain language: it can report your 30-day CI failure rate, scan for red pull requests, and fix failing checks by pushing to the PR branch. The README marks the project as a public alpha.
Why this repo matters
Per the README, CI tells you that something broke, not why or how to fix it, so teams hit re-run and main stays red until a senior engineer has time. OpenSRE does that investigation: it reads logs, tests hypotheses, separates CI-caused failures from code-caused ones, and pushes a fix for you to review. It is Apache 2.0, self-hosted and works with your own models. The same agent also investigates production incidents through integrations such as Kubernetes, Grafana and Datadog.
Best practices
- Start read-only. The CI/CD overview says analysis and the health scan are read-only; fixing and repair loops push commits.
- Begin with the analytics demo. The docs call the 30-day CI reliability report "the recommended first demo".
- Mind the push rules. The docs say fix and repair runs refuse pull requests opened from forks and never push directly to a protected branch such as
main. - Use
/auto medif you want prompts. The Fix GitHub CI doc says at the default/auto highthe mutating steps run without prompts;/auto medasks before each one. - Authorize headless runs one tool at a time.
opensre ask --allowed-tool <tool>covers a single tool for that run only. - Set a telemetry preference. Product analytics and Sentry errors are opt-out;
export OPENSRE_NO_TELEMETRY=1disables them.
How-to
Where do I start?
1. Install and sign in
How do I get it running? On macOS or Linux the README gives a one-line installer, then you start the agent:
curl -fsSL https://install.opensre.com | bash -s -- -gh
opensre
The installer fetches the latest build from main without sudo. If opensre is not found, follow the PATH note it prints or open a new terminal. Signing in activates the hosted model, so no LLM key is needed to begin.
Next: Connect GitHub
Try it
Ask OpenSRE for the demo repair: the docs say it creates a small private repository named opensre-ci-repair-demo- plus four characters, opens a pull request with a failing check, and repairs it. Then run /loops show <task-id> to read the report. Delete the demo repository afterwards, since the docs say it remains.
Pitfalls
- Public alpha. The README warns APIs and integrations may change.
- Hosted-model sign-in. The shell only opens for an active account; a machine that is not signed in needs
LLM_PROVIDER, a provider key and a GitHub token in the environment. - Scheduled loops need the shell open. The reliability loop fires while the shell is open;
/loops service installkeeps it running after you close the terminal. - A fix is a push. At the default autonomy level the checkout, edit, commit and push steps run without prompts.