In 2023 I wrote that prompt engineering is engineering: same failure modes, same trade-offs, same need for discipline. A year later I argued that long context doesn't replace retrieval. Both hold up. But the work has moved, and the name should too.
The job is no longer mostly about the words in the instruction. It's about everything else in the window.
What goes in the window
For a one-shot question, the context is the prompt. For an agent working for an hour, it's a growing pile: the system instructions, the tool definitions, the conversation, every tool result, files it read, notes it made. By the tenth step most of the tokens aren't anything you wrote.
Whatever fits in that window is what the model knows. Anything outside it doesn't exist. Deciding what's inside, at each step, is context engineering.
Why bigger windows didn't solve it
More room doesn't mean better use of it. Three things I keep running into.
Noise costs accuracy. A relevant fact buried among irrelevant tool output is easier to miss and easier to contradict. Models don't weigh everything equally and they don't announce what they ignored.
Everything costs money and time. Every token is processed on every step of a loop. A bloated context makes the agent slower and more expensive for the entire rest of the run.
Stale context misleads. An early file read that's since been edited, or a plan that was abandoned, sits in the window as if it were true.
The practices that matter
None of these is fancy. They're what you do when you treat the window as a scarce resource.
Retrieve, don't preload. Give the agent a way to look things up and let it pull in what it needs. A list of file names and a read tool beats a dump of every file.
Trim tool output. A search that returns 200 results should return the top ten with a way to get more. Truncate logs. Summarize big payloads. Most tool results are too long by default.
Compact on purpose. When a long task gets heavy, summarize the earlier steps into a short state: what was decided, what's done, what's next. Do it deliberately, rather than letting the window overflow and lose the beginning.
Put stable things first. Instructions and tool definitions that don't change should come first and stay identical, so provider-side caching can do its job. Reordering them every turn is paying full price for nothing.
Separate memory from window. Durable facts belong in a file or store the agent can read, not in a conversation that will eventually be cut.
Measure it
You can't improve what you can't see. Log what's actually in the context at each step, its size and where the tokens went. A common finding the first time a team does this: the tool definitions alone take a large share of every call, and nobody had noticed because nobody had looked.
Why the name matters
"Prompt engineering" made people think about phrasing. That's the smallest lever. The large ones are structural: what's retrieved, what's remembered, what's discarded.
A good test of a team's maturity here is a single question: can you tell me what the model saw before it made that decision? If the answer is "not exactly", that's the work.