The 3-try loop: when CodeStilt keeps going and when it stops
How failing tests are fixed automatically, why we stop at three, and why those tries are free.
7 Nov 2026 · 2 min read · CodeStilt teamAfter the approved change is written, the desktop app runs the test command named in the plan, in your project folder, for up to 15 minutes.
When tests pass
The task is done. You see the changed files with lines added and removed, and the test result.
When tests fail
CodeStilt sends the error output to the AI, which fixes the code and tries again. The fix still has to stay inside the approved files, and still passes through the danger wall.
Why we stop at three
If tests still fail after 3 tries, more tries usually mean wasted money, not progress. The task stops, and the credits for those tries are returned. You can undo everything, or give the task again with more detail about what should happen.
Extra checks before tests run
Tests run your project's own code. So if a task changed a file that controls what the test command runs, like package.json or a test config, or added code that goes online or reads keys and environment variables, CodeStilt asks you before running the tests.