Anti-Patterns to Avoid
These are the most common failure modes we observed in research and experiments. Recognizing them early saves significant time and frustration.
1. The Kitchen Sink Session
Section titled “1. The Kitchen Sink Session”Pattern: Start with one task, ask about something unrelated, go back to the first task, explore a third topic. The context fills with irrelevant information from multiple topics.
Fix: Clear/reset your context between unrelated tasks. Each task gets a fresh, focused context.
# Bad — accumulated context from 3 unrelated tasks> Fix the auth bug> [2000 tokens of auth code]> How does the billing module work?> [3000 tokens of billing code]> Now go back to that auth bug> [Agent has 5000 tokens of billing noise in context]
# Good — clear between topics> Fix the auth bug> [resolved]> [clear or reset context before starting the next task]> How does the billing module work?2. The Correction Spiral
Section titled “2. The Correction Spiral”Pattern: The agent does something wrong. You correct it. Still wrong. Correct again. Context is now polluted with multiple failed approaches, and the agent is “confused” by the conflicting instructions.
Fix: After two failed corrections, start a fresh session and write a better initial prompt that incorporates what you learned from the failures.
3. The Over-Specified Configuration
Section titled “3. The Over-Specified Configuration”Pattern: Your agent configuration file grows to 400+ lines with detailed style guides, file-by-file descriptions, full API documentation, and tutorials. The agent ignores half of it because important rules get lost in the noise.
Fix: Ruthlessly prune to under 60 lines. Move domain-specific content to skills. Delete rules the agent follows naturally. Ask: “Would removing this cause a concrete mistake?“
4. The Trust-Then-Verify Gap
Section titled “4. The Trust-Then-Verify Gap”Pattern: The agent produces plausible-looking code. You scan it briefly, looks fine. Ship it. The edge cases aren’t handled, and a bug reaches production.
Fix: ALWAYS provide verification mechanisms. Tests, type checking, linting, screenshot comparison. If you can’t verify it, don’t ship it.
5. The Infinite Exploration
Section titled “5. The Infinite Exploration”Pattern: Ask the agent to “investigate” or “look into” something without scope boundaries. It reads 40+ files, consuming most of the context window with exploration data that may not be relevant.
Fix: Either scope investigations narrowly (“check src/auth/ for how token refresh works”) or delegate to sub-agents so exploration doesn’t consume main context.
6. The Monolithic Task
Section titled “6. The Monolithic Task”Pattern: Ask the agent to implement an entire feature in one session. Context fills with file reads, failed approaches, and partial implementations. Quality degrades as the session progresses.
Fix: Decompose into phases (Research → Plan → Implement) with compaction between each. For large features, decompose into multiple independent implementation tasks.
7. The Style Guide Configuration
Section titled “7. The Style Guide Configuration”Pattern: Fill your agent configuration file with formatting rules, indentation preferences, and naming conventions that a linter could enforce deterministically.
Fix: Use Biome, ESLint, or Prettier with pre-commit hooks. LLMs are expensive and unreliable at enforcing style. Reserve your configuration file for instructions that require judgment.
8. The No-Plan Jump
Section titled “8. The No-Plan Jump”Pattern: Ask the agent to immediately implement a complex feature without research or planning. It picks the first approach that seems reasonable — which may be wrong for your architecture.
Fix: For any task touching more than 2-3 files, use the three-phase workflow: Research → Plan → Implement.
9. The Copy-Paste Context Dump
Section titled “9. The Copy-Paste Context Dump”Pattern: Paste 2,000 lines of code into the prompt “for context.” Most of it is irrelevant, consuming context budget for zero signal.
Fix: Reference files by path. Let the agent read what it needs. Provide just the relevant section if you must paste.
# BadHere's the entire auth module: [2000 lines]Add rate limiting.
# GoodAdd rate limiting to the auth middleware.See src/middleware/auth.ts for the current flow.Follow the pattern in src/middleware/cors.ts.10. The Auto-Generated Configuration
Section titled “10. The Auto-Generated Configuration”Pattern: Use your tool’s initialization command to generate a configuration file and never edit it. The auto-generated file includes generic advice and descriptions the agent doesn’t need.
Fix: Your agent configuration file is one of your highest-leverage files. Manually craft every line. Remove anything that doesn’t prevent a concrete mistake.
Pattern Recognition
Section titled “Pattern Recognition”If you notice any of these symptoms, you’ve likely hit an anti-pattern:
| Symptom | Likely Anti-Pattern |
|---|---|
| Agent ignores your configuration file rules | Over-specified configuration (#3) |
| Agent asks questions answered in the configuration file | Ambiguous phrasing in the configuration file |
| Agent’s output quality decreases over session | Kitchen sink (#1) or infinite exploration (#5) |
| Multiple correction attempts fail | Correction spiral (#2) |
| Agent picks wrong architecture | No-plan jump (#8) |
| Bugs reach production | Trust-then-verify gap (#4) |
| Context fills quickly | Copy-paste dump (#9) or infinite exploration (#5) |