What Is Context Engineering
The discipline that defines how modern AI coding agents actually work.
Beyond the LLM Wrapper
AI coding tools like Claude Code and Cursor are sometimes dismissed as simple wrappers around large language models. In reality, what makes them effective is the engineering around the model — the orchestration layer that manages tool calls, controls the agent loop, handles errors, enforces guardrails, and most importantly, decides what context is sent to the model at each step. This surrounding system is often called the agent harness.
The model invocation itself is straightforward. What determines whether an agent works reliably is how the harness manages state, tools, memory, and context. Every call to an LLM comes with context, and that context originates from multiple sources and accumulates over time.
Where Context Comes From
- ▸Developer-provided instructions — system prompts, configuration files, architectural rules
- ▸User input — the task or question being asked
- ▸Tool results — outputs from file reads, searches, shell commands, API calls
- ▸Conversation history — previous turns, decisions, and intermediate results
- ▸External data — retrieved documents, web searches, database queries
New context sources keep appearing. As agents run longer tasks with more tool calls, the amount of accumulated context grows continuously. Managing this growth is the central challenge of context engineering.
The Agent Harness
Context engineering is the natural evolution of prompt engineering. Prompts are static, but context is dynamic. Building the right context requires a dynamic system, not just a well-crafted string.