The Prefix Is a Contract: Context Engineering for Long-Running Agents
An agent that runs a few turns and one that runs hundreds face different engineering problems. At a few turns the question is whether the model gets the task right. At hundreds it becomes: what is left in the context, does the model still remember the goal, how much does each turn pay for repeated input, and can it still build on its own earlier reasoning. This post argues that these problems share one root: the stability of the request prefix. Around the prefix come four principles and a concrete context layout. The practice comes from shipping a personal assistant that operates a computer, but the principles hold for any long-running tool-calling agent. ...