Agents optimize endlessly but never question the problem
We've been running agents on research tasks for six months. The pattern is always the same: they start strong, find a decent solution, then spend hours polishing it into something worse.
Last week our research agent found a solid approach to our data pipeline problem in 45 minutes. Then it spent three more hours "optimizing" until the solution was 40% slower and used twice the memory. It kept reporting progress the entire time.
The issue isn't capability—it's that agents optimize endlessly without questioning whether the problem is actually solved. They treat "good enough" as a starting point, not a destination.
Here's the pattern that fixed it:
COMPLETION_CRITERIA = {
"functional_threshold": "Solution works for primary use case",
"performance_baseline": "Matches or beats current approach",
"time_budget": "4 hours max per solution track",
"improvement_gate": "20% better or stop trying"
}The key insight: agents need explicit stopping conditions, not just success criteria. Success criteria tell them when they've won. Stopping conditions tell them when to stop trying to win harder.
We added three checkpoints to every research task:
- Baseline achievement: "You have a working solution. Document it before optimizing."
- Improvement threshold: "Each iteration must improve metrics by 20% or explain why you're continuing."
- Time budget: "After 4 hours, ship your best documented solution regardless of potential improvements."
The results were immediate. Our agents started shipping solutions instead of chasing perfection. More importantly, they stopped burning API tokens on marginal improvements that made things worse.
The counterintuitive part: agents with stopping conditions produce better final solutions. When they know they have limited optimization time, they focus on changes that actually matter.
Your research agents need the same discipline. Set completion criteria that define "good enough," then enforce them. Otherwise you'll get agents that optimize your 90% solution into a 60% solution while confidently reporting progress.
The difference between a research agent and an optimization loop is knowing when to stop.