There is a technique making the rounds called the Ralph loop. In its purest form it is a Bash loop: while :; do cat PROMPT.md | claude-code ; done. You point a coding agent at a task, give it a fresh context window every iteration, and let it run until the work is done. State lives in files, not in the conversation. The pitch is that you can run an agent indefinitely without it drowning in its own accumulated context.

The pitch is right about the destination and wrong about how it describes the trip. "Throw away the context every turn" is a catchy summary and a misleading one. The technique that actually works is narrower and more interesting, and it comes with two costs the excitement skips over. One of them is a bill you can measure in dollars.

A Ralph loop is a pattern for long-running agents where each iteration starts with a clean context window and durable state is carried on the filesystem instead of in the conversation history. It matters because model performance degrades as context grows, so a small clean context can beat a large accumulated one. It differs from a single long session in that memory lives in external artifacts the agent re-reads, rather than in a transcript that keeps growing until it rots.