InfraLoka AcademyPathwayAI
PathwayAI

Module 10 · Chapter 7: Agent loops

Fix loops driven by tests

4 min read5 min readReviewed 26 October 2026

In short

A failing test is an honest signal for an agent loop: write it first, see it fail for the right reason, then fix. Run the tests that prove the change and its callers, not every test, and never let the agent change a test to pass.

After this lesson you can

  • Use a failing test as the signal in a fix loop
  • Pick the tests that prove the change rather than running every test

Sign in to read this lesson

The title and summary are open to everyone. The full lesson is for signed-in learners.