{
  "id": 2625909,
  "title": "Stop Blaming the LLM: Why Your AI Agents Keep Failing (And How to Fix Them)",
  "url": "https://urgent.news/2026/08/22/stop-blaming-the-llm-why-your-ai-agents-keep-failing-and-how-to-fix",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-22T18:08:42.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/abdullahahmad/stop-blaming-the-llm-why-your-ai-agents-keep-failing-and-how-to-fix-them-4a2g"
  },
  "original_language": "en",
  "account": "The author encountered problems with an AI agent interacting with a Next.js and Express backend integration. The agent was hallucinating non-existent packages and losing context during execution. In a moment of frustration, the author blamed the model's intelligence, but upon reflection, realized the issue lay in a lack of infrastructure provisions.\n\nThe author coined the term \"Harness Engineering\" to describe the need for proper support structures around AI models. The model itself is just the engine; the harness provides the necessary framework, including context management, standardized tools, durable state, and strict verification.\n\nTo improve the agent's performance, the author restructured the workflow. Instead of providing the model with raw codebase dumps, targeted retrieval was implemented, limiting the context window to specific files needed for the task at hand. Model Context Protocol (MCP) servers were integrated to give the model secure, bounded ways to execute actions, replacing the model's tendency to generate text.\n\nDurable state was introduced, allowing the system to checkpoint progress if a long-running workflow pauses or fails. This prevented the system from starting from scratch each time, enabling smoother resumption. Strict verification was also enforced, rejecting outputs like \"Looks good to me\" and requiring the agent to run tests and verify CLI output before concluding a task.\n\nBy focusing on harness engineering rather than just prompt engineering, the author transformed the fragile text generator into a dependable developer. The key takeaway is that while clever models are valuable, their autonomy depends on the reliable systems built around them. True autonomy requires engineers to learn to break the system they initially trusted and engineer a better one.",
  "summary": "I was staring at a broken Next.js and Express backend integration late at night, convinced my AI agent had lost its mind. It was supposed to be a straightforward n8n automation pipeline. Yet, every time it ran, it hallucinated non-existent packages and dumped its context halfway through. My System 1 intuitive reaction flared up immediately: The LLM just isn't smart enough. I sat there, exhausted,…",
  "key_points": [
    "Author blames AI model intelligence, not infrastructure",
    "Implements targeted retrieval, MCP servers, durable state, strict verification",
    "Shift from prompt to harness engineering improves AI agent performance"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}