What is context engineering?
Context engineering is figuring out what information to give an AI model so it has what it needs for a task without a pile of noise. Everything the model sees at once sits in its context window, which holds the system prompt, your instructions, files and past messages. Prompt engineering is about wording a single prompt well, while context engineering covers everything the model reads.
The term caught on in June 2025. Shopify CEO Tobi Lütke posted that he liked “context engineering” better than “prompt engineering.” Andrej Karpathy agreed about a week later and called it the art of filling the context window with just the right information for the next step. It stuck because an AI agent does a lot more than answer one prompt. It runs in an agent loop that piles up tool output, file contents and conversation history with every turn.
A lot of it comes down to habits. You keep the system prompt and Markdown instruction files like CLAUDE.md lean, pull in only the files that matter and use RAG to fetch the relevant documents instead of dumping everything in. Claude Code loads only a short description of each skill up front and reads the full skill when it’s needed. Handing a side task to a subagent keeps its searching and reading in its own context window so only a short summary comes back.
Bigger context windows don’t make the problem go away. Models tend to follow instructions worse and miss details when the context is stuffed with irrelevant material. Chroma published research in July 2025 that called this “context rot” and found that models got less reliable as the input grew longer, even on simple tasks. Anthropic’s guide to context engineering treats context as a limited resource for the same reason.
The topic blew up while context windows were more limited but the conversation trailed off once we started getting windows of 1 million+ tokens. I still think it’s something either a human or a machine needs to think about and it’s related to subagents too. You still get the best results by managing the context, especially for running skills.