Manage the context
Include what's needed to decide, exclude what isn't — more context is not better context.
An agent only knows what's in front of it. The skill is deciding what belongs there. The instinct to "give it everything just in case" is the most common way prompts go wrong.
Include what's load-bearing
The facts the agent needs to make the decision: the relevant code, the constraint it must respect, the example of the format you want. If a detail changes the answer, it's load-bearing — put it where it will be read, near the instruction, not buried.
Exclude what isn't
Irrelevant detail doesn't just waste tokens — it dilutes attention. Three unrelated files in the context make the agent less certain about which one you mean. Curation is part of the prompt.
Order matters
Models weight the start and end of a long context more reliably than the middle. Put the instruction and the most critical facts where they won't get lost.
Context is finite and costs money
Every token is budget and latency. A tight, curated context is faster, cheaper, and more accurate than a big one — on every model. When context gets large, that's a signal to decompose the task, not to keep piling on.
A useful question
For each thing you're about to include: "would the right answer change if I removed this?" If no, cut it.