Four-Layer Agent Stack: Prompt vs Context vs Loop vs Harness
A long-form X post that separates four commonly conflated terms into one nested stack: the harness executes loops, each loop iteration assembles context, and context carries the prompts. For each layer it lists the unit of work, typical artifacts, and failure symptoms, plus a diagnostic table: quality decay after turn 15 means prune history (context), repeated identical edits mean missing memory and no-progress detection (loop), double writes and hung subprocesses mean idempotent retries and timeouts (harness). The headline claim: if verification never runs, no prompt edit helps. It cites Karpathy on context engineering, Boris Cherny on loops, and a LangChain Deep Agents Terminal-Bench 2.0 gain from harness changes alone — without numbers. Useful as a layered triage checklist for engineers shipping production agents.