← All courses

A Hands-On Course · 11 lessons

Agent Anti-Patterns

The named failure modes and their fixes — infinite context, the yes-man agent, objective drift, and more. Diagnosis-first.

Short lessons (~5–8 min each), each with one tangible win and a retrieval-practice quiz. Built for engineers who already use AI coding tools and want the non-obvious mechanics.

Grounded in the agentpatterns.ai corpus (CC BY 4.0). Keep the Glossary open as you go.

Part 1 · Context

1 The Infinite Context The first instinct when an agent fails is to give it more. More files, more history, more docs. That instinct is the anti-pattern. 2 The Kitchen Sink Session One session, running all day, doing everything. It feels efficient. It is quietly poisoning every task after the first. 3 Distractor Interference The last two lessons were about irrelevant context. This one is worse: context that is relevant, and still hurts.

Part 2 · Behavior

4 The Yes-Man Agent It does exactly what you asked. Every time. That is not a feature — it's the failure mode shipping errors at machine speed. 5 Objective Drift The agent never stops working. It just quietly starts solving a slightly different problem — and every step after looks productive. 6 Token Preservation Backfire "Be efficient. Don't waste tokens." Reasonable advice for a person. For a long-horizon agent, it's an instruction to do less. 7 Trust Without Verify Well-formatted prose with inline citations looks authoritative. Code that compiles looks correct. Neither feeling is evidence.

Part 3 · Configuration

8 Configuration Smells in AGENTS.md Your AGENTS.md loads at every session start — every byte trades against the task budget. Six named defects are quietly taxing 91 of 100 popular repos. 9 Single-Layer Injection Defence You added URL allow-listing and called injection solved. An attacker who knows your one defense just targets the gap it leaves.

Part 4 · Security & Ops

10 AI Agents in CI/CD "AI reviewer in GitHub Actions" sounds like a productivity win. In its default shape it's a CVSS 9.4 critical — and the model is not the gate.

Capstone

11 The Diagnostic Table Ten anti-patterns, one skill: read a symptom and name the failure behind it. Diagnosis first, fix second.