RepoPilot
2026GitHub issue-to-patch agent
An AI agent that investigates a GitHub issue, proposes a minimal patch, and checks it with tests in Docker. A draft pull request needs your approval.
overview
A convincing explanation is easy to generate; a working fix needs evidence. I built RepoPilot to make that distinction visible. Give it a local repository or GitHub URL and an issue, then inspect its investigation, plan, diff, and test results in a CLI or React dashboard. The goal is to make routine issue work easier to review, with a record of what actually ran.
the problem
An agent can sound confident while changing the wrong code, weakening tests, or spending too long investigating. Letting it run arbitrary commands or publish changes also gives a small task a much larger reach. RepoPilot needed bounded execution, an untouched original checkout, and a clear distinction between a proposed fix and a verified result.
how it works
A Python state machine coordinates investigation, planning, patch validation, sandbox tests, and up to two repair attempts. The CLI and FastAPI service share the same workflow; a React dashboard exposes the timeline, diff, and before-and-after tests. The model can search, read files, and propose a patch, while the backend owns command execution. Work happens in a temporary clone, and fixed test profiles run in resource-limited Docker containers without network access. SQLite stores runs, events, usage, and approvals. Only an explicit approval allows the GitHub API to create a draft PR.
result
RepoPilot helps maintainers assess a suggested fix without reconstructing the agent's work. Reports distinguish passed, failed, inconclusive, and aborted runs, alongside token usage, cost, and unresolved items. The repository documents two approved draft PRs on a demo project. Its bundled synthetic benchmark demonstrates the workflow, but does not establish performance on large, real-world repositories.
- Baseline and post-patch tests in isolated Docker containers
- At most two repair attempts, with run and spending limits
- Reviewable diff and explicit approval before a draft PR
built with
Python, FastAPI, React, TypeScript, SQLite, Docker, GitHub API, OpenAI-compatible APIs
