solanodz

Agentic AI: What Actually Breaks in Production

Agent demos look autonomous. Production agents fail in predictable ways: tool loops, bad recovery, memory drift, weak permissions, missing observability, and workflows with no clear stop condition.

Published Jun 9, 2026

AIAgentsProductionAutomation
Agentic AI demos usually show the happy path: the agent plans, calls tools, updates state, and finishes the task. Production systems are less clean. Tools fail. APIs timeout. Memory gets stale. The model repeats itself. A workflow pauses for approval and resumes with missing context.
The real question is not whether an agent can complete a task once. The real question is whether it can fail safely, recover predictably, and leave enough evidence for an engineer to understand what happened.

Integration And Data Quality Fail First

Before you debug the agent loop, check the environment it runs in. In Anthropic's 2026 enterprise survey, the top adoption barriers were integration with existing systems (46%), data access and quality (42%), and change management (39%). Model capability was not the headline problem.
That matches what teams see in practice. An agent connected to stale CRM data will confidently take wrong actions. An agent without access to the right internal APIs will invent workarounds. An agent deployed without a rollout plan will break workflows that humans still depend on.
Treat agent deployment as a systems project:
  • Map which systems the agent reads from and writes to.
  • Fix data freshness and permissions before expanding autonomy.
  • Plan change management for the humans whose workflows the agent touches.
If the underlying data and integrations are weak, better prompts only produce more confident failures.

The Agent Loop Is The First Risk

Most agents are built around a loop. That loop needs guardrails. Without them, the agent can call the same tool forever, bounce between two tools, spend too much money, or keep trying after an unrecoverable error.
Rendering diagram...
This diagram is missing the things production needs: limits, budgets, policies, and stop conditions.

Infinite Tool Loops

Tool loops happen when the model believes one more call will fix the situation.
Common causes:
  • The tool returns vague errors.
  • The model retries without changing arguments.
  • The agent has no max step count.
  • The workflow has no definition of "done."
  • The tool output does not tell the model what changed.
Add loop controls:
ts
type AgentLimits = {
  maxSteps: number;
  maxToolCallsPerTool: number;
  maxRuntimeMs: number;
  maxCostUsd: number;
};
 
function shouldStop(run: AgentRun, limits: AgentLimits) {
  return (
    run.steps.length >= limits.maxSteps ||
    run.runtimeMs >= limits.maxRuntimeMs ||
    run.costUsd >= limits.maxCostUsd ||
    run.repeatedToolCalls > limits.maxToolCallsPerTool
  );
}
The model should not be responsible for enforcing the budget. The runtime should.

Planning Failures Look Like Tool Failures

Not every loop starts in the tool layer. Singapore's IMDA Agentic AI governance framework highlights planning and reasoning as their own failure surface: the agent can hallucinate a plan, misread user intent, or drift away from an earlier plan even when individual tool calls succeed.
That drift shows up in production as:
  • Calling valid tools in the wrong order.
  • Solving a different problem than the user asked for.
  • Repeating work because the plan lost track of completed steps.
  • Escalating scope without asking for approval.
When debugging a bad run, inspect the plan before blaming the tool implementation.

Memory Drift

Memory sounds useful until it starts preserving the wrong thing.
Bad memory stores:
  • Temporary user preferences as permanent facts.
  • Outdated project state.
  • Tool outputs without timestamps.
  • Failed assumptions from earlier steps.
  • Sensitive data that should not persist.
Useful memory is scoped.
Memory typeLifetimeExample
Step stateOne tool callParsed arguments
Run stateOne workflow executionCurrent ticket, retry count
Thread memoryConversationUser goal, decisions made
Long-term memoryExplicitly savedStable preference or domain fact
Do not let every agent run write to long-term memory. Promote facts deliberately.

Error Recovery Is A Product Feature

Agents do not need to recover from every error. They need to recover from expected errors and stop cleanly on dangerous ones.
ts
type ToolError =
  | { kind: "retryable"; message: string; retryAfterMs?: number }
  | { kind: "needs_user_input"; message: string; missingFields: string[] }
  | { kind: "permission_denied"; message: string }
  | { kind: "fatal"; message: string };
Different errors require different behavior:
  • retryable: backoff and retry with a cap.
  • needs_user_input: ask the user, do not guess.
  • permission_denied: stop or request authorization.
  • fatal: stop and summarize what failed.
Vague errors create bad agent behavior. Structured errors create recoverable workflows.

Tool Permissions Break Late

During development, agents usually run with broad permissions. In production, the agent touches real systems and suddenly permissions matter.
The failure pattern:
  1. The agent retrieves private data it should not see.
  2. The agent calls a write tool without approval.
  3. The agent sends output to the wrong channel.
  4. The logs contain sensitive tool payloads.
Fix this with scoped tools and policy checks.
Rendering diagram...
The model can propose an action. The runtime decides whether it is allowed.
Prefer structural controls over prompt-layer guardrails. IMDA's framework is explicit here: telling an agent in a system prompt not to call a tool is weaker than access control that makes the tool impossible to invoke. Prompts can be bypassed, forgotten, or overridden by context pressure. Permissions, approval gates, and scoped credentials should live in the runtime.
Also tier autonomy by risk. Dayos, cited in the same framework, routes IT tickets into three tiers: low-risk reversible work runs automatically with periodic audits, moderate-risk work requires human approval before execution, and high-risk production changes stay human-only until safeguards mature. That pattern scales better than giving every agent the same level of freedom.

Multi-Agent Systems Add New Failure Modes

Single-agent failures are painful. Multi-agent failures can compound.
IMDA identifies several production risks that do not show up in single-agent demos:
Failure modeWhat it looks like
Agent sprawlDozens of agents with overlapping tools, unclear ownership, and no central catalog
MiscoordinationTwo agents interpret the same goal differently and work against each other
ConflictOne agent optimizes speed while another optimizes cost or compliance
Cascading errorsA bad intermediate result propagates through later steps and amplifies impact
Singapore's framework also notes that multi-agent systems can produce emergent behavior that does not appear when each agent is tested alone. That means pre-deployment testing needs both unit-level agent tests and system-level multi-agent tests.
If you do not need multiple agents, do not add them for architecture aesthetics. Start with one bounded agent and split only when the task genuinely requires specialization.

State Machines Beat Vibes

For business workflows, state should be explicit. If the agent is onboarding a customer, triaging an issue, or processing an alert, define the allowed states.
ts
type WorkflowState =
  | "started"
  | "gathering_context"
  | "waiting_for_approval"
  | "executing"
  | "completed"
  | "failed";
 
const allowedTransitions = {
  started: ["gathering_context"],
  gathering_context: ["waiting_for_approval", "executing", "failed"],
  waiting_for_approval: ["executing", "failed"],
  executing: ["completed", "failed"],
  completed: [],
  failed: [],
};
This keeps the agent from jumping from "missing context" to "executed action" just because the model produced a confident plan.

Observability Is Not Optional

When an agent fails, you need to replay the run mentally.
Capture:
  • User request.
  • Planner output.
  • Tool selected.
  • Tool arguments after validation.
  • Tool result.
  • State transition.
  • Retry count.
  • Latency and cost.
  • Final answer.
  • Human approvals.
Without these traces, debugging becomes prompt archaeology.
OpenTelemetry now defines agent-specific span types such as invoke_agent, invoke_workflow, and execute_tool, along with attributes like gen_ai.agent.id, gen_ai.agent.name, and gen_ai.agent.version. That matters because a generic "LLM call" span is not enough when one user request fans out into several agents, tools, and retries. Instrument at the workflow level, not just the model level.
Human approval is part of observability too. IMDA recommends tracking human override rate and approval response time. If approvers almost never reject agent actions, or approve in a few seconds every time, you may have automation bias rather than meaningful oversight.

Test Before You Trust The Loop

LangSmith separates offline evaluation before release from online evaluation on live traffic. For agents, both are necessary, but the test dimensions are different from chatbot evals.
Before deployment, IMDA recommends testing at least:
  • Overall task execution accuracy.
  • Policy adherence.
  • Tool-use accuracy, including wrong-tool and malformed-argument cases.
After deployment, turn production failures into future tests. LangSmith's recommended loop is straightforward: a bad trace gets reviewed, added to a dataset, rerun in an offline experiment, fixed, redeployed, and monitored again with online evaluators such as format checks, safety heuristics, or reference-free LLM judges.
That loop is how agent systems stop repeating the same production mistake.

What Actually Helps

The best production agent systems are not the most autonomous. They are the most constrained.
Practical controls:
  • Max step count.
  • Max runtime.
  • Tool call deduplication.
  • Idempotency keys for writes.
  • Structured tool errors.
  • Structural permissions, not prompt-only guardrails.
  • Tiered autonomy based on reversibility and blast radius.
  • Human approval for high-risk actions.
  • Monitoring of override rate and approval quality.
  • State machines for long-running workflows.
  • Agent and tool spans, not just model spans.
  • Pre-deployment tests for execution, policy, and tool use.
  • Online evals plus offline regression datasets.
  • Gradual rollout instead of full autonomy on day one.
  • Replay failing traces before changing prompts.

The Takeaway

Agentic AI breaks less like a chatbot and more like a distributed workflow system. The model is only one part of the runtime.
If you want agents in production, design for failure first: loops, retries, permissions, memory, state transitions, and observability. The agent should be powerful inside a narrow lane, not free inside a vague one.
Further reading:

Solano de Zuasnabar

AI Engineer · Tucumán — Argentina