Stop obsessing over prompt wording because your agent is A developer argues that optimizing prompt wording is no longer the bottleneck for AI agents, citing that around 40% of AI agent projects fail in real-world deployment due to issues in the execution harness rather than the model. The article outlines a shift from prompt engineering to context engineering and now to 'harness engineering,' which focuses on tool definitions, error handling, and loop termination logic. Stop obsessing over prompt wording because your agent is prompts/ folder filled with nearly 50 hyper-optimized templates. I had perfected few-shot examples, complex Chain-of-Thought scaffolds, and custom ReAct loops. I spent hours A/B testing whether a single comma or a specific phrase like "Let's think step by step" would squeeze out an extra 2% of accuracy. By mid-2025, I had deleted half of them. The prompts weren't bad; they just weren't the bottleneck. The real reason my production agents were crashing wasn't the wording—it was the "harness." It was the tool definitions, the file access permissions, the error handling when a function returned garbage, and the logic governing when a loop should actually terminate. I was spending all my time polishing a doorknob while the house had no foundation. Why your production agent is hitting a wall There is a massive gap between a "demo" agent and a "production" agent. Recent industry data suggests that around 40% of AI agent /en/tags/ai%20agent/ projects fail once they move into real-world deployment. When CTOs perform post-mortems on these failures, the consensus is almost always the same: the model wasn't the problem. The failure happens in the transition from a single LLM call to a complex AI workflow. If you are building agents, you need to move past the "poetry" of prompting and start thinking about the engineering of the entire execution environment. We have essentially moved through three distinct eras of development: Stage 1: Prompt Engineering The Era of Incantation : This was about optimizing a single input string. We treated prompts like magic spells. It worked for isolated tasks, but the moment you needed an agent to actually do something—read a file, call a tool, or manage state—the single prompt approach fell apart. Stage 2: Context Engineering The Era of Information Curation : This is where we are now. The focus has shifted from the "message" to the "context window." It’s about how you manage RAG /en/tags/rag/ Retrieval-Augmented Generation , how you structure tool definitions, and how you feed the model the right history. You aren't just typing words anymore; you are curating a stream of tokens from various sources. Stage 3: Harness Engineering The Era of Agentic Systems : This is the current frontier. It’s about the "scaffolding" around the LLM. How does the agent handle a tool error? How does it rollback a failed action? How does it navigate a codebase? A practical look at the shift To illustrate the difference, look at how we approach a task. A "prompt engineer" tries to write a massive, 2,000-word instruction set to prevent errors. A "harness engineer" writes a concise instruction set but builds a robust system to catch and correct those errors automatically. If you want to move toward a more stable agentic deployment, you should stop focusing on the "perfect prompt" and start building a robust execution harness. This means implementing strict structured outputs, building retry logic for tool calls, and ensuring your context retrieval is surgically precise. Here is a simplified example of a "Harness-first" approach. Instead of a massive prompt trying to handle every edge case, we use a clean system prompt and rely on the code to manage the "messy" reality of the environment. Instead of a 500-line prompt, use a lean system prompt and wrap the execution in a robust harness. SYSTEM PROMPT = """ You are a technical assistant. You have access to the following tools: get file content, run terminal command . Always return your thoughts in a 'thought' block and your action in a 'call' block. """ def agent harness user query : context = retrieve relevant docs user query messages = {"role": "system", "content": SYSTEM PROMPT}, {"role": "user", "content": f"Context: {context}\n\nQuery: {user query}"} for attempt in range MAX RETRIES : response = llm.generate messages try: The harness handles the parsing and error catching action = parse action response result = execute tool action Feed the result back into the loop messages.append {"role": "assistant", "content": response} messages.append {"role": "tool", "content": result} if is task complete result : return result except ToolError as e: This is the 'Harness' in action: instead of the agent hallucinating, the system corrects it. messages.append {"role": "tool", "content": f"Error: {str e }. Please try a different approach."} return "Failed to complete task after multiple attempts." The goal isn't to write a prompt that never fails; it's to build a system where failure is handled gracefully. That is the difference between a toy and a tool. Next Amazon is forcing a shift to passkeys and it changes everything → /en/threads/8594/