# What Are Common AI Agent Failure Modes?

> The main ways an AI agent goes wrong, why one small slip grows, and the code checks that catch it, explained simply for your AI interview.

**In short:** An agent often fails by picking the wrong tool, letting one error grow through later steps, never stopping, losing track of facts in a long context, claiming success too early, or having too much access. Each has a known fix in code.

AI and LLM interview question Q174, Agents and tool use. Intermediate, very common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/common-ai-agent-failure-modes

## Say it in 30 seconds

The common failures are wrong tool calls, errors that pile up across steps, no stop point, losing track of facts in a long context, claiming success too early, and having too much access. Small slips compound. In a simple model where each step is 95 percent right, a 20-step job is right only about 36 percent of the time. So I cap the steps, require a passing check before anything is marked done, and give each tool only the access it needs.

## Say it in 2 minutes

An AI agent is a model that works through a task in steps. It calls a tool, reads the result, and picks the next step. Each loop is a chance to go wrong. The common failures are wrong tool calls, errors that pile up, no stop point, lost context, false success and too much access.

Errors compound because every step builds on the one before. If each step is right 95 percent of the time and the steps are independent, a 20-step job is right about 36 percent of the time. Real agents are messier than that model, but the direction holds, and it is why long jobs need checks.

The fixes are plain engineering. Make tool inputs strict, so malformed values are rejected before they run. Cap the steps and the spend, so a loop stops and a person takes over. Keep the context short for each step. Require a passing check before the agent can say done. Give each tool only the access it needs, and get a person to approve anything that can't be undone.

In an interview, name two or three modes, say what symptom you would see, and give the fix in code. A stronger prompt helps a little, but the limits have to live in code the model can't rewrite.

## What is an AI agent failure, in plain words?

An AI agent is a model that works on a task in steps. It calls a tool, reads what came back, and picks the next step. Anthropic describes agents as "typically just LLMs using tools based on environmental feedback in a loop".

A failure mode is a common way something goes wrong, the kind of problem you can name in advance. For an agent, the loop goes wrong: a bad choice, a bad input, or a claim of success that isn't true, which then shapes every step after it.

Think of a new claims clerk in their first week with full access to the system. They are careful, but they may follow an old form, miss a rule that changed on Monday, and mark a file done before the checks run. A claims triage agent, made up for this page, handles thousands of files a day, so the same slip spreads before anyone looks.

- **Tool call:** The model asks your code to run a function, such as look up a claim. Your code runs it.
- **Step cap:** A limit on how many steps one job may take, after which a person takes over.
- **Context:** The text the model can see at one time: rules, the task, and every tool result so far.
- **Guardrail:** A rule in code that checks or blocks an action before it happens.

## Which failure modes should you be able to name?

Six failure modes are a useful way to sort agent problems. Each has a symptom you can see, a cause, and a fix.

- **Wrong tool or wrong input:** The agent calls a function that doesn't fit the job, or passes a value that belongs to another customer. Fix: strict tool inputs that reject malformed values, plus a check in code that each ID belongs to the case being worked on.
- **Errors pile up:** One wrong early step becomes the input to every later step, so the final answer looks confident and is wrong. Fix: a check after each step, before the next one runs.
- **No stop point:** The loop repeats a failing call, or keeps searching, and the bill grows. Fix: a step cap (a limit on how many steps run) and a spend cap (a limit on money spent), with a clear hand-off to a person when either is hit.
- **Lost in a long context:** As the chat and the tool results grow, the model recalls information from its context less accurately. Anthropic's engineering article points to studies that have uncovered "the concept of context rot". Fix: keep each step's context short and carry only the facts it needs.
- **Says done too early:** The agent reports success before the work is checked. In one Anthropic experiment with long-running agents, the agent marked the whole project finished too early. Fix: a passing check is required before anything is marked done.
- **Too much access:** The agent can send mail, delete files or move money. Untrusted text in a web page or email can also steer it, which OWASP describes as indirect prompt injection. OWASP names excessive functionality, permissions and autonomy as the root causes of Excessive Agency. Fix: give each tool the least access, and ask a person before actions that can't be undone.

> "Agents might call the wrong tools, call the right tools with the wrong parameters, call too few tools, or process tool responses incorrectly." (Anthropic, on writing tools for agents)
>
> "Claude declares victory on the entire project too early." (Anthropic, on long-running agents)
>
> "Excessive Agency is the vulnerability that enables damaging actions to be performed in response to unexpected, ambiguous or manipulated outputs from an LLM" (OWASP, LLM03:2026)

## How does one small slip become a big failure?

Errors compound because each step builds on the last. Here is a simple model with made-up numbers. Say each step is right 95 percent of the time and the steps don't affect each other. Then a 20-step job is fully right only about 36 percent of the time. Anthropic's evaluation guide makes the same general point: agents "use tools across many turns", so "mistakes can propagate and compound".

> "The autonomous nature of agents means higher costs, and the potential for compounding errors." (Anthropic, on building effective agents)

*Diagram, How one small slip grows: One wrong tool call gets carried forward by every step after it. The mistake shows up at the end, after the damage is done, which is why each step needs a check.*
1. The tool returns a result built on the bad input.
2. The agent accepts that result as true and carries on.
3. Every later step builds on it, and the wrong claim reaches the end.

This small program puts the odds and a safe stop into code. It prints the odds for 1, 5, 10 and 20 steps. Then a made-up claims triage agent runs three jobs: one finishes, one hits the 12-step cap and goes to a person, and one fails its checks and is held.

```python
# Claims triage agent, made-up numbers. Each step has a 95% chance of being right,
# and we pretend the steps are independent (a simplification).
STEP_RIGHT = 0.95
MAX_STEPS = 12

for steps in (1, 5, 10, 20):
    print(f"{steps:2} steps: {STEP_RIGHT ** steps:.0%} chance every step is right")

def triage(plan, checks_pass):
    done = []
    for step in plan:
        if len(done) >= MAX_STEPS:
            return f"STOP: step cap hit after {len(done)} steps, send to a claims handler"
        done.append(step)
    if not checks_pass:
        return "HOLD: checks failed, the claim is not marked done"
    return f"DONE: {len(done)} steps, all checks passed"

print(triage(["read form", "match policy", "check fraud flags", "price", "write note"], True))
print(triage(["read form"] * 15, True))
print(triage(["read form", "match policy"], False))
```

Output:

```text
 1 steps: 95% chance every step is right
 5 steps: 77% chance every step is right
10 steps: 60% chance every step is right
20 steps: 36% chance every step is right
DONE: 5 steps, all checks passed
STOP: step cap hit after 12 steps, send to a claims handler
HOLD: checks failed, the claim is not marked done
```

The step cap (lines 12 and 13) and the check gate (lines 15 and 16) protect the claim. Code decides when a claim is finished. The program gates only once, at the end. In a real agent the same gate runs after every step.

## What stops these failures in production?

No single fix is enough, so stack small checks in code. The chart maps five of the failure modes to the check that limits each one. Lost context, the sixth mode, is handled by keeping each step's context short, so it is not in the chart.

*Diagram, Five failure modes and the code check for each: Five failure modes on the left, each joined to the code check that limits it on the right. The check decides what happens, not the model.*
1. Rules for each field reject a malformed tool call before it runs.
2. A check after each step catches a slip before it spreads.
3. A step cap stops the loop and hands the case to a person.
4. A passing check has to exist before the agent may say done.
5. Each tool gets only the access it needs, nothing more.

1. **Strict inputs:** Reject a bad tool call before it runs, with a written rule for each field that says what values it may take. Check in code that every ID belongs to this case.
2. **Check each step:** Run a check on each output before the next step builds on it.
3. **Cap steps and spend:** Stop after a fixed budget, and hand the case to a person with a short summary of what was done.
4. **Require a passing test:** Done needs a passing check that code runs, never only the agent's own report.
5. **Least access, human approval:** Give only the access the job needs. A person signs off on any action that can't be undone.

Anthropic makes a similar point: agents "can then pause for human feedback at checkpoints or when encountering blockers". It also recommends "extensive testing in sandboxed environments, along with the appropriate guardrails".

> **Tip:** Ask how you would test an agent before launch. Say you run a fixed set of tasks, count the failures for each mode, and fix the top one first.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] The common modes by name: wrong tool or input, errors piling up, no stop point, lost context, false done, too much access.
- [ ] Why one slip grows: each step builds on the last one.
- [ ] The fix in code, not in the prompt.
- [ ] A step cap and a spend cap, with a hand-off to a person.
- [ ] A passing check before anything is marked done.
- [ ] How you would test it: a fixed set of tasks, with failures counted for each mode.

**Common traps**

- Trap: "Just write a better prompt." Better: A prompt helps a little. The limits and checks must live in code the model can't rewrite.
- Trap: "A good model won't make these mistakes." Better: Errors compound over many steps, so even a good model needs a check after each step.
- Trap: "If the agent says it's done, it's done." Better: Done needs a passing check that code runs. The agent's own report is not enough.

## Can you spot the failure?

**Spot the failure:** This log comes from a claims job. Which line shows the failure the team must fix first?

A. step 4: read policy PDF, ok
B. step 9: final_check = FAILED (missing invoice), status: done
C. step 2: lookup_claim(claim_id='C-20417'), ok
D. step 6: summarise notes, 212 tokens

**Answer:** B. The final check failed, yet the status says done. That is "says done too early": done must follow a passing check, enforced in code.

**Quick check:** An agent runs a 20-step claims job. Each step is right 95 percent of the time, and the steps are independent. Roughly how often is the whole job right?

A. About 95 percent
B. About 77 percent
C. About 36 percent
D. About 5 percent

**Answer:** C. Each step multiplies the chance, so 0.95 to the power 20 is about 0.36. A high chance per step still leaves a big risk over many steps.

## Can you answer these from memory?

**Flash cards**

- **What is an agent failure mode?** A common way an agent's loop goes wrong, with a known symptom and fix.
- **Name the six common modes.** Wrong tool or input, errors pile up, no stop point, lost context, says done too early, too much access.
- **Why do errors compound?** Each step builds on the last, so one slip carries into every step after it.
- **What does a step cap do?** It stops a loop after a fixed number of steps and hands the case to a person.
- **What proves a job is done?** A passing check that code runs, which the agent's own report cannot replace.
- **What fixes most of these?** Limits and checks in code: strict inputs, step caps, passing tests and least access.

## Likely follow-up questions

- Q173 How do you stop endless agent loops? https://designervenkat.online/interview/ai/how-do-you-stop-endless-agent-loops
- Q176 How should an agent handle tool errors and retries? https://designervenkat.online/interview/ai/how-should-an-agent-handle-tool-errors-and-retries
- Q179 Excessive agency and least privilege? https://designervenkat.online/interview/ai/excessive-agency-and-least-privilege
- Q172 When and how do you add a human in the loop? https://designervenkat.online/interview/ai/human-in-the-loop-for-ai-agents
- Q181 How do you evaluate agents? https://designervenkat.online/interview/ai/how-to-evaluate-ai-agents
- Q201 What is prompt injection? https://designervenkat.online/interview/ai/what-is-prompt-injection
