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). ...

Landing the Plane

Landing the Plane is a session termination protocol for AI agents, formalized by Steve Yegge (creator of the Beads framework). It addresses the “amnesia” problem where agents lose context between sessions and leave “crap” (temporary artifacts) behind. The Problem Without a disciplined shutdown process: Context Loss: The next session starts fresh (“50 First Dates”), leading to repetitive re-explanation. Repo Pollution: Abandoned git branches, stashes, and debugging artifacts clutter the workspace. State Drift: The issue tracker (or mental model) falls out of sync with the actual code state. The Protocol When a user says “Land the plane,” the agent executes a scripted checklist to safely close the session: ...

Preflight the Plane

Preflight is a session initiation checklist for AI-assisted / agentic work. It is the counterpart to Landing the Plane (session shutdown): where landing focuses on cleanup + handoff, preflight focuses on scoping + context selection + verification setup so the session doesn’t drift. When to run it Run preflight when: you start a new chat (especially after a reset) you resume after time away you’re about to start an autonomous “loop” (background run / repeated iterations) you notice context pollution and decide to restart cleanly The Problem Without a preflight: ...

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.