All posts
Architecture Published 8 min

Three patterns I broke in 2025, and what I do instead now

Self-correction loops without budgets, single-agent solutions to multi-domain problems, and using JSON mode to force structure I should have built into the schema. An honest review.

Jigar JoshiJigar JoshiAgentic AI Architect and Consultant
In this post (4 sections)

A year-in-review of the agent patterns I broke in production and what replaced them. I share the failures because the wins are over-shared, and because every one of these looked correct when I built it. The lesson each time was the same shape, which is the most useful part.

1. Self-correction loops without budgets

I built three systems that asked the model "are you sure?" and let it iterate until satisfied. Two of them ran a 50-step loop in production once before we caught it, burning tokens and time on a task that was never going to converge. Now every self-correction loop has an explicit step budget, and budget exhaustion is a typed failure mode the calling code handles, not a recovery the agent attempts. This is the exit-condition discipline I unpack in why your agent keeps failing after 3 steps.

2. Single-agent solutions to multi-domain problems

Cramming "you are an analyst, a coder, and a writer" into one system prompt always seems efficient until the model picks the wrong hat at the wrong moment. Now I use separate agents per domain, even when each is small. The coordination overhead is real but lower than the cost of cross-domain confusion, and it pairs with the orchestration choice in supervisor pattern versus handoffs. The same instinct applies one level down to tools: one tool, one purpose.

3. JSON mode forcing structure I should have schemed

I used JSON mode to coerce arbitrary text into structured output. The model would obey the structure but stuff garbage into the fields, which is the worst failure mode because it looks valid. Now I reach for structured tool calls with strict schemas, and reserve JSON mode for cases where the schema itself is genuinely free-form. The caveat is that the 2026 schema-enforcement improvements made this distinction fuzzier, which is exactly why I revisited it in I was wrong about JSON mode.

Three broken patterns and their replacements
Pattern I brokeHow it failedWhat I do now
Unbounded self-correctionRan 50-step loops in prodStep budget + typed failure
One agent, many domainsPicked the wrong hatOne agent per domain
JSON mode for any structureValid shape, garbage fieldsStrict tool calls; JSON for free-form

The throughline

Trust the constraints, do not trust the model to self-impose them. A step budget is a constraint; "iterate until satisfied" is a hope. A per-domain agent is a constraint; "be three experts at once" is a hope. A strict schema is a constraint; "please return clean JSON" is a hope. Every one of these failures was me asking the model to police itself, and every fix was moving the guarantee into the system around it.

If you are reviewing an agent that works in the demo but wobbles in production, these three are the first patterns I look for. Auditing them is a routine part of my consulting work, and they are case studies in our training.

The weekly take

Agentic AI patterns, delivered Thursdays

What I am shipping, watching, and pruning out of client stacks each week. One email. No fluff.

Shipping an agentic AI project this quarter?
Book a 30-min consult
Frequently asked

Questions readers ask about this post

Share this post
LinkedIn Facebook