Context poisoning is the phenomenon in which errors or noise mixed into the information given to a language model as the premise of a generation task cause it to produce output that is logically consistent locally but wrong as a whole. Spec駆動開発におけるコンテキストエンジニアリングとCustom Slash Commandsのベストプラクティス names it as one of three problems that Context engineering is meant to address, alongside Context rot and Context confusion. Its symptoms, in that post’s account, are incorrect implementations or documentation, and implementations or explanations that contradict the current specification.
Usage
The post traces the cause to outdated specifications, comments that were never updated, and similar code unrelated to the task finding its way into the context. Because the model tries to produce an answer consistent with the information it is given, it reproduces an error in its input “in a clean form”.
In the post’s account of designing Custom slash commands, context poisoning is one of the reasons for making every command write its result to a file: output left only in the console can be used only within that session, which amounts to being unable to reset the context, and carrying an overloaded context forward invites context poisoning and context rot. Passing a file from one command to the next, and clearing the context in between, is presented as the way to cut that carried-over noise.