Transparency Note: This article was written and edited by me — a real human being — with light assistance from AI-based editorial tools for grammar and structural clarity. All examples, data, and contextual insights were authored and verified by me. AI tools were not used to generate financial, technical, or compliance assertions. This disclosure is included for compliance with Medium transparency standards.
Eighty-eight percent of enterprise AI agent initiatives never reach production. Not because the models are bad. The models are extraordinary. They fail because nobody built the infrastructure to keep them honest.
That is the uncomfortable truth behind the agentic AI gold rush. The gap between a working demo and a reliable production system is where projects go to die. The average cost of a failed AI agent project is $340,000 in direct engineering spend, not counting opportunity cost or the organisational credibility damage that makes the next AI proposal harder to fund.
In financial services, where 94% of banks are on course to fail at agentic AI implementation, the stakes are higher. A hallucinating customer-service chatbot is embarrassing. A hallucinating credit-decisioning agent is a regulatory violation.
The firms that are succeeding — the 6% — are not using better models. They are practising a discipline that most AI teams have not heard of yet: harness engineering.
What Is Harness Engineering?
Harness engineering is the discipline of designing the systems, constraints, and feedback loops that wrap around AI agents to make them reliable in production. It is the difference between an AI agent that works in a demo and one that works at 3 AM on a bank holiday when the on-call engineer is asleep.
The term gained mainstream traction in February 2026 when OpenAI published its Codex harness engineering findings, describing how they built an entire production system — roughly one million lines of code — using agent-written software, governed entirely by harness infrastructure rather than human code review.
A harness includes everything the agent needs to operate safely:
- The tools it can access, and the ones it cannot
- The constraints that bound its behaviour — budget limits, action caps, scope restrictions
- The feedback loops that help it self-correct: reflection, evaluation, retry logic
- The observability layer that lets humans monitor its behaviour in real time
- The governance layer that enforces policy through compliance checks, approval gates, and audit trails
Think of it as the difference between giving someone a car and giving them a car with seatbelts, airbags, lane assist, speed limiters, and a dashcam. The car is the model. The harness is everything that makes it safe to drive.
Five Failure Modes Killing AI Agents in Production
Before engineering solutions, it helps to diagnose the disease. Research from Composio, OWASP, and production post-mortems across the industry point to five dominant failure modes.
Image produced by Gemini-2.5-Flash
1. Dumb RAG: The Memory Problem
Agents that cannot retrieve the right context at the right time make bad decisions — and make them confidently. Poor retrieval-augmented generation accounts for a significant share of production failures, typically manifesting as agents answering questions with outdated policies, irrelevant precedents, or hallucinated "facts" that sound plausible but are wrong.
In financial services, this means a KYC agent applying last quarter's sanctions list. Or a compliance agent citing a regulation that was superseded six months ago.
The fix is a context validation layer: retrieval freshness verification, relevance scoring with configurable thresholds, and fallback-to-human when retrieval confidence drops below acceptable levels.
2. Brittle Connectors: The Integration Problem
The gap between what an API promises and what it delivers in production is the second-largest source of agent failures. Agents built against sandbox APIs discover that production APIs have different rate limits, different error formats, different authentication flows, and different data shapes.
Nearly two-thirds of all agent failures trace back to scope overreach and data quality issues — agents tasked with more than their underlying infrastructure can support.
What works: schema-validated tool interfaces with explicit error handling contracts, circuit breakers that degrade gracefully when downstream services fail, and integration testing that runs against production-equivalent environments. Not sandboxes.
3. Cascading Hallucinations: The Propagation Problem
This is the failure mode that keeps risk officers awake at night. OWASP classified it as ASI08 in their 2026 Top 10 for Agentic Applications.
In a multi-agent pipeline, the output of Agent A becomes the input for Agent B, whose output feeds Agent C. If Agent A hallucinates a data point, Agent B makes decisions based on that hallucination, and Agent C takes actions based on those decisions. By the time a human sees the final output, the original error has been laundered through multiple layers of plausible reasoning.
Three factors make this uniquely dangerous:
- Semantic opacity — natural-language errors pass validation checks that would catch malformed JSON
- Emergent behaviour — multiple agents create unintended outcomes that no single agent's logs explain
- Temporal compounding — errors persist in agent memory and contaminate future operations
Real-world impacts already documented include auto-remediation agents suppressing genuine alerts, database agents acting on hallucinated instructions, and healthcare agents propagating incorrect treatment protocols to downstream systems.
The fix here is structural: inter-agent validation gates, output verification against ground-truth data sources, confidence-scored handoffs with automatic escalation, and immutable trace logging that lets you reconstruct the exact propagation chain post-incident.
4. The Polling Tax: The Architecture Problem
Agents that poll APIs instead of reacting to events waste 95% of their API calls, burn through rate-limit quotas, and never achieve real-time responsiveness. In financial services, where market data and transaction states change in milliseconds, polling-based agents are architecturally incapable of meeting performance requirements.
Event-driven architectures with webhook-based triggers solve this. Message queues for asynchronous processing, and reactive agent loops that respond to state changes rather than periodically checking for them.
5. Governance Theatre: The Compliance Problem
Perhaps the most insidious failure mode. Organisations write AI governance policies, create ethics boards, publish responsible-AI principles — and then deploy agents with no technical enforcement of any of it.
There is a critical distinction between governance theatre (policies written but never enforced) and governance engineering (policies turned into running code). When 95% of organisations have experienced at least one AI incident — including privacy violations (33%), systemic failures (33%), and inaccurate predictions (32%) — governance theatre is actively dangerous. It creates a false sense of safety.
What actually works: policy-as-code enforcement, automated compliance checks at every decision point, immutable audit trails that prove governance adherence rather than merely claiming it, and governance metrics that measure enforcement rate rather than policy count.
The Harness Engineering Stack for Finance
Image produced by Gemini-2.5-Flash
The firms in the successful 6% share a common architectural pattern. Their harness is not a single tool. It is a layered stack, each layer addressing a specific class of production failure.
Layer 1: Input Validation and Context Management
Every agent interaction begins with input validation. Not just format checking — semantic validation that ensures the agent has the right context, the right permissions, and the right scope for the task.
In practice this means request classification (is this within the agent's defined scope?), context freshness verification (is the retrieved data current?), permission verification, and data completeness checks. If the agent does not have enough information to act, it should say so rather than guessing.
Layer 2: Constraint Enforcement
This is where harness engineering diverges most sharply from traditional software engineering. Constraints are not defensive coding. They are the primary mechanism for controlling agent behaviour.
Five concrete budget guardrails, enforced at the infrastructure level:
- Loop and step limits — prevent infinite reasoning chains
- Tool-call caps — prevent runaway API consumption
- Per-run token budgets — prevent cost explosions
- Wall-clock timeouts — prevent hung agents blocking resources
- Per-tenant budgets with anomaly alerts — prevent one client's workload affecting others
The key metric shift here: from tokens consumed to Cost-per-Accepted-Outcome (CAPO). Measuring cost against business value delivered, not computational resources used.
Image produced by Gemini-2.5-Flash
Layer 3: Feedback Loops and Self-Correction
Production agents need closed-loop systems that detect errors and correct them before they reach end users.
This includes reflection middleware (the agent evaluates its own output before delivery), verification middleware (output checked against known constraints and business rules), loop detection (identifies when the agent is cycling without progress), and progressive escalation (automatic handoff to human review when confidence drops or corrections accumulate).
LangChain's composable middleware pattern illustrates the architecture: Agent Request → LocalContextMiddleware → LoopDetectionMiddleware → ReasoningSandwichMiddleware → PreCompletionChecklistMiddleware → Agent Response. Each layer adds a specific reliability guarantee.
Layer 4: Observability and Monitoring
AI agent observability has moved from developer convenience to mission-critical infrastructure. 89% of organisations have implemented observability for their agents, with quality issues emerging as the primary production barrier at 32%.
Agent observability differs from traditional software monitoring because agents operate non-deterministically with multi-step reasoning chains spanning LLM calls, tool usage, retrieval systems, and complex decision trees.
Production-grade agent observability requires trace-level logging of every LLM call, tool invocation, and decision point. It requires semantic evaluation — not just "did it respond" but "was the response correct and appropriate." It requires real-time cost tracking with automatic alerts and circuit breakers, per-step latency monitoring, and drift detection to identify when agent behaviour shifts from established baselines.
Gartner predicts that by 2028, 60% of software engineering teams will use AI evaluation and observability platforms — up from 18% in 2025.
Layer 5: Governance Engineering
The final layer translates compliance requirements into executable infrastructure. In financial services, this means:
- EU AI Act readiness — human oversight mechanisms, audit trail generation, conformity documentation (high-risk requirements effective August 2, 2026)
- FCA Consumer Duty alignment — ensuring AI-driven decisions deliver good customer outcomes across product design, pricing, eligibility assessment, and communications
- Treasury FS AI RMF compliance — mapping harness controls to the 230 control objectives published February 2026
- SR 11-7 model risk management — treating agent harnesses as model risk infrastructure requiring independent validation
Image produced by Gemini-2.5-Flash
The FCA's Mills Review, launched January 2026, is explicitly examining agentic AI's implications for retail financial services through 2030. The UK Treasury Committee has warned that a "wait-and-see" posture risks serious harm to consumers and the financial system, calling for AI-specific stress testing and practical Consumer Duty guidance.
From Governance Theatre to Governance Engineering
The shift requires three changes.
Treat Agent Validation as Infrastructure-Grade Testing
Standard AI evaluation uses pass@k: if one out of k trials succeeds, the test passes. Production harness engineering demands pass^k: all k trials must succeed. The difference is profound. pass@k tells you the agent can succeed. pass^k tells you it reliably succeeds.
Five measurable dimensions for agent validation:
- Consistency — same input produces acceptably similar outputs
- Robustness — the agent handles edge cases and adversarial inputs without failing silently
- Predictability — behaviour stays within defined bounds
- Safety — no harmful outputs, no policy violations
- Cost stability — no runaway spend across varied workloads
Measure Governance, Do Not Just Declare It
When you can measure governance, you can improve it. Five metrics that matter:
- Policy enforcement rate — percentage of decisions that passed through all required governance checkpoints
- Escalation accuracy — percentage of escalated decisions that genuinely required human review
- Audit trail completeness — percentage of agent actions with full provenance chains
- Time-to-intervention — how quickly humans can identify and halt problematic agent behaviour
- Compliance coverage — percentage of regulatory requirements mapped to running harness controls
Own the Outcome Organisationally
In credit and risk-decisioning systems, nobody owns the outcome. Product owns the model, engineering owns the infrastructure, compliance owns the policy. When a decision is challenged, each team points somewhere else.
The 6% of banks succeeding with agentic AI have designated agent system owners — individuals accountable for the end-to-end behaviour of an agent system, with authority across model, infrastructure, and compliance domains.
Why This Matters Now
Three regulatory deadlines are converging:
- April 2026 — FCA's PS25/22 "targeted support" framework activates, creating the first compliant pathway for automated financial guidance with hard-coded constraints
- August 2, 2026 — EU AI Act high-risk requirements take effect, mandating human oversight, audit trails, and conformity assessment for AI systems in financial services
- Ongoing — US Treasury's FS AI RMF (February 2026) provides 230 control objectives that US financial regulators are already using as examination benchmarks
Meanwhile, 48% of cybersecurity professionals identify agentic AI as the number-one attack vector heading into 2026, outranking deepfakes, ransomware, and supply-chain compromise.
The firms investing in harness engineering today are not just avoiding production failures. They are building the infrastructure that regulators will expect, auditors will examine, and customers will demand.
The 88% failure rate is not a technology problem. It is an engineering problem. And engineering problems have engineering solutions.
Build the harness.
Sources
- The 2025 AI Agent Report: Why AI Pilots Fail in Production — Composio
- Why Most Banks Will Fail at Agentic AI — Finextra
- Harness Engineering: Leveraging Codex in an Agent-First World — OpenAI
- Cascading Failures in Agentic AI: OWASP ASI08 Guide — Adversa AI
- State of AI Trust in 2026 — McKinsey
- AI Observability Tools: A Buyer's Guide 2026 — Braintrust
- What Is Harness Engineering? Complete Guide 2026 — NxCode
- AI Agent Guardrails: Production Guide 2026 — Authority Partners
- FCA AI and Retail Financial Services — FCA
- FCA Mills Review Key Takeaways — Freshfields
- UK FCA, PRA Hold Principles-Based AI Line — ResultSense
- Deploying AI in Financial Services in the UK — Kennedys Law
- OWASP Top 10 for Agentic Applications 2026 — Aikido
- Harness Engineering — Martin Fowler / ThoughtWorks
- Agentic AI in Financial Services Research Roundup 2026 — Neurons Lab
- Decoding the US Treasury's AI Risk Management Framework — TCS
Author's Bio
Terry Yodaiken advises investment and wealth managers on AI adoption, hybrid data architectures, and explainable decision systems. POVIEW.AI helps institutions build governed, production-grade AI that delivers measurable commercial outcomes.