Context Hygiene

Context Hygiene is the disciplined practice of managing an LLM’s context window to maintain agent performance, accuracy, and efficiency. As context windows grow, the temptation is to “stuff” them, but practical experience shows that “context pollution” degrades reasoning capabilities. Core Principles 1. One Task Per Context Window Geoffrey Huntley emphasizes that developers should treat a context window like a small, precious resource (analagous to RAM in early computing). The rule is “one task per context window” (also formulated as Context is a Per-Feature Budget). ...

Context is a Per-Feature Budget

Context is a Per-Feature Budget is the operational principle that treats an LLM’s context window not as a persistent workspace, but as a finite, depleting resource allocated to a single unit of work (e.g., a feature, a bug fix, or a distinct task). The Core Concept Long-running chat sessions suffer from Context Decay. As a conversation grows, the model’s adherence to initial system instructions, quality bars, and specific constraints degrades. The model becomes “forgetful” or “lazy,” often silently dropping requirements (measured at ~40% drop rate in some experiments). ...

Semantic Zoom

Treating text as an elastic medium by explicitly directing an AI to “zoom out” (summarize/condense) to reduce context noise, or “zoom in” to detail specific areas.