Can AI auto fix production issues?
Can AI auto fix production issues? I built a free tool called Code Akos to find out. It watches an app for crashes, and an AI model suggests a fix for a person to approve. The first thing I tested was the step that sorts errors. On 37 sample errors, DeepSeek hid 2 real failures. After I fixed my own rule, 111 more runs hid none.
In short
When a live app breaks, an engineer has to find out why. Then they fix the code by hand. Engineers call the live app “production”, so these are production issues.
Code Akos tries to do the first draft of that work. It notices the crash and records it as an issue. Then an AI model works on a temporary copy of the code. Its change goes to a new branch, never straight into the branch you work on. It writes a small change. If you set a check command, such as your tests, it runs that to see if anything fails. Then it proposes the change as a pull request, which is a request to add new code.
A person must read that request and approve it. Code Akos never merges a change by itself. You can run it with a free local model.
The first step sorts each error. Is it a real problem, and is it a small fix? I tested this with DeepSeek, a model that runs in the cloud. It sorted 37 sample errors, 3 times each. It found every small fix. It never hid a real failure once I fixed my own rules.
It still made mistakes. Some hard bugs, where the cause is far from the crash, were called small fixes.
The second step writes the fix. The model only suggests. A person reads every change.
The technical details
Setup
Code Akos is at version 1.3.0. It runs on your own computer, so you set it up yourself. Your app sends errors to it through a Sentry SDK, and you connect a GitHub repo with a token. The part that tries to auto fix production issues is called the resolver. It picks up crash issues and tries to fix them. The default model is qwen2.5-coder:7b, running through Ollama on your own machine. A person reviews every pull request. You can read more on the Code Akos project page, browse the Code Akos source on GitHub, or read the full guide to AI bug fix pull requests.
How it tries to fix production bugs
Here is what one attempt to fix production bugs looks like, step by step.
- It makes a temporary copy of the code on a new branch.
- If you set a check command, it runs that first. If the check already fails, it skips the issue.
- The model gets the issue and up to 3 source files from the stack trace.
- The model has 4 tools: read a file, list a folder, search the code, and edit a file.
- The model has no shell tool, so it cannot run commands or install anything by itself. But the check command in step 7 does run the code it changed.
- It gets up to 20 turns. It must end with FIX or SKIP.
- Code Akos runs the check command again, if you set one.
- The pull request is marked Verified or Unverified. Unverified means no check command was set, or the check still fails.
The model is asked to change only a few lines in one or two files.
How it helps you debug production issues
Even a skipped issue is useful. The record shows why the model skipped it, which can help you debug production issues yourself. The model is told to treat the issue text as data, not instructions. Nothing in the code forces it to obey. That matters because an error message can hold text an attacker wrote. For the model, Code Akos tries the providers you set up, in order. The default order is Ollama, then DeepSeek, then Anthropic. It moves to the next one only when a call fails.
Default settings
These are limits I chose, not measured success rates.
| Setting | Default |
|---|---|
| Time between resolver rounds | every 5 minutes |
| Issues worked on at the same time | 3 |
| Most model turns per attempt | 20 |
| Failed attempts before it stops | 3 |
| Wait after the first failed attempt | 15 minutes, then doubling |
For comparison, Sentry Seer costs $40 per active contributor per month on a paid Sentry plan, as of October 2026.
Result
I tested the triage step, which sorts and labels each error. The set has 37 sample errors. Each one has an answer written down before the model runs. They cover real exceptions, error messages in logs, test messages, permission errors and network errors. I ran it through the DeepSeek API with the model deepseek-flash, not on my own computer.
The first run was one trial. It found every small fix, but it hid 2 real failures. Both were error messages in logs that contain the word “test”: “unit test runner crashed” and “Payment test failed: card declined”. The model called them test messages and hid them. A real payment failure was treated as noise.
The cause was partly in my own code. The rule that stops a model from calling a real error a test message did not cover logged messages. I changed the rule. Then I ran 3 trials, which makes 111 runs.
| DeepSeek | Before the fix (1 trial) | After the fix (3 trials, 111 runs) |
|---|---|---|
| Real failures hidden | 2 | 0 |
| Small fixes found | 15 of 15 | 45 of 45 |
| “Small fix” calls that were right | 15 of 18 | 45 of 54 |
| Real errors kept, not dismissed as noise | 95% (35 of 37) | 100% (111 of 111) |
| Right tags | 92% | 98% (109 of 111) |
| Named the right code | 97% | 97% |
| Median time per error | 1.3 s | 1.3 s |
The two cases the fix aimed at now pass, and no case that passed before fails now. The before and after runs are not exactly alike, because it was 1 trial against 3. This is a small set on one machine, so read the percentages as a rough guide and not as a benchmark.
What went wrong
First, the rule fixed one kind of mistake. It did not make the model’s judgment better. In every trial DeepSeek still called some deep cause bugs a small fix: a recursion error, a bad config value and a cache key error. The cache key case was called a small fix in 3 of 9 runs. Of the 54 times it said small fix, 9 were wrong, and all 9 were bugs with a deeper cause. It also missed the infrastructure tag on one logged permission case in 2 of 3 trials.
Second, the fixer does not read the triage tags today. Triage is the step that labels each issue. Some issues get marked as needing a human, or as infrastructure problems. The fixer picks every open issue Code Akos filed anyway. So a wrong small fix call on a deep cause becomes a wasted or wrong fix attempt, and on a paid model each attempt costs money. A fix marked Verified only means your check command passed.
Third, nothing fences in the check command. It runs the changed code with your own user permissions, so only set a command you would run yourself.
What I will try next
Make the fixer respect the “needs a human” tag.