Using an AI agent to decide what parts of code should be tested

Discussion

I’ve been experimenting with an idea where an AI agent sits in the dev workflow and reacts to code changes.

Instead of developers manually deciding what to test, the agent:

  • looks at what changed in the code
  • tries to understand which parts of the system are affected
  • and triggers or suggests the relevant tests

What’s interesting to me is that this turns testing into an agent problem:
the agent has to reason about impact, risk, and coverage based on code context, not just run static rules.

I’m also exploring a conversational layer on top of it, where you can ask:
“What did this change affect?”
“Which part looks risky?”

and the agent answers based only on the project’s own code and structure.

The part I’m most unsure about (and would love opinions on):

  • How much autonomy should an agent have in deciding test scope?
  • Should it only suggest tests, or be allowed to execute them?
  • What would make you trust an agent with this responsibility?

I’m building a small project around this idea, but I’m more interested in how people here think about agents applied to software quality.

Curious to hear thoughts from others working on agent-based systems.

Posted Jan 31, 2026, 1:33 PM UTC

28
Loading comments…