Agent Anti-Patterns · ~6 min
The last two lessons were about irrelevant context. This one is worse: context that is relevant, and still hurts.
The instinct: cover all cases. Make the instruction file comprehensive so nothing is missed. Include every rule that might be relevant. It feels like a safety net. It is a distractor field.
A prompt for writing integration tests includes instructions on unit-testing conventions, component-testing patterns, and end-to-end structure — all accurate, all in the same domain, only one applicable. The model attends to all three. The applicable instruction now competes with two related-but-wrong ones, and compliance on it is lower than if they were absent.
Shi et al. (2023) showed model reasoning accuracy drops sharply when irrelevant but domain-coherent content is added to the prompt. The same finite-attention pressure from the infinite context applies to instruction sets: a rule accurate-in-general but inapplicable-here is not neutral — it draws attention away from the rule that matters, and the effect scales with every inapplicable line you add.
The test for inclusion is not "is this correct?" — it's "does this improve output on this specific task?" Load task-scoped, prune the rest.
If removing unrelated instructions improves compliance, you've just confirmed distractor interference and found your fix in the same move.
Over-pruning has its own failure mode. Strip adjacent instructions too aggressively and you under-inform the model on edge cases; mis-classify the task and you load the wrong set entirely — a broad fallback is a partial safety net. Genuinely cross-domain tasks need both files; cutting one causes real failures, not interference. The pattern works best for well-defined, bounded tasks.
Retrieval practice — recall, don't peek
Question 1A related-but-inapplicable instruction is…
Question 2The right test for including a rule is…
Question 3You should organise instruction files by…
Question 4Over-pruning's main risk is that you…
Question 5 · spaced recall from Lesson 02The kitchen-sink session is fixed by…