Thursday, February 5, 2026

Context Engineering for Coding Brokers

The variety of choices now we have to configure and enrich a coding agent’s context has exploded over the previous few months. Claude Code is main the cost with improvements on this area, however different coding assistants are rapidly following go well with. Highly effective context engineering is changing into an enormous a part of the developer expertise of those instruments.

Context engineering is related for all sorts of brokers and LLM utilization in fact. My colleague Bharani Subramaniam’s easy definition is: “Context engineering is curating what the mannequin sees so that you just get a greater outcome.”

For coding brokers, there’s an rising set of context engineering approaches and phrases. The inspiration of it are the configuration options provided by the instruments (e.g. “guidelines”, “abilities”), after which the nitty gritty of half is how we conceptually use these options (“specs”, numerous workflows).

This memo is a primer in regards to the present state of context configuration options, utilizing Claude Code for instance on the finish.

What’s context in coding brokers?

“All the pieces is context” – nevertheless, these are the primary classes I consider as context configuration in coding brokers.

Reusable Prompts

Virtually all types of AI coding context engineering in the end contain a bunch of markdown recordsdata with prompts. I take advantage of “immediate” within the broadest sense right here, prefer it’s 2023: A immediate is textual content that we ship to an LLM to get a response again. To me there are two major classes of intentions behind these prompts, I’ll name them:

  • Directions: Prompts that inform an agent to do one thing, e.g. “Write an E2E take a look at within the following manner: …”

  • Steerage: (aka guidelines, guardrails) Common conventions that the agent ought to comply with, e.g. “At all times write assessments which might be unbiased of one another.”

These two classes typically mix into one another, however I’ve nonetheless discovered it helpful to tell apart them.

Context interfaces

I couldn’t actually discover a longtime time period for what I’d name context interfaces: Descriptions for the LLM of the way it can get much more context, ought to it determine to.

  • Instruments: Constructed-in capabilities like calling bash instructions, looking recordsdata, and so on.

  • MCP Servers: Customized packages or scripts that run in your machine (or on a server) and provides the agent entry to information sources and different actions.

  • Abilities: These latest entrants into coding context engineering are descriptions of further sources, directions, documentation, scripts, and so on. that the LLM can load on demand when it thinks it’s related for the duty at hand.

The extra of those you configure, the more room they take up within the context. So it’s prudent to suppose strategically about what context interfaces are needed for a specific activity.

Context Engineering for Coding Brokers

Information in your workspace

Essentially the most primary and highly effective context interfaces in coding brokers are file studying and looking, to grasp your

If and when: Who decides to load context?

  • LLM: Permitting the LLM to determine when to load context is a prerequisite for working brokers in an unsupervised manner. However there all the time stays some uncertainty (dare I say non-determinism) if the LLM will really load the context after we would count on it to. Instance: Abilities

  • Human: A human invocation of context offers us management, however reduces the extent of automation total. Instance: Slash instructions

  • Agent software program: Some context options are triggered by the agent software program itself, at deterministic closing dates. Instance: Claude Code hooks

How a lot: Preserving the context as small as doable

One of many objectives of context engineering is to steadiness the quantity of context given – not too little, not an excessive amount of. Despite the fact that context home windows have technically gotten actually massive, that doesn’t imply that it’s a good suggestion to indiscriminately dump data in there. An agent’s effectiveness goes down when it will get an excessive amount of context, and an excessive amount of context is a value issue as properly in fact.

A few of this dimension administration is as much as the developer: How a lot context configuration we create, and the way a lot textual content we put in there. My advice could be to construct context like guidelines recordsdata up progressively, and never pump an excessive amount of stuff in there proper from the beginning. The fashions have gotten fairly highly effective, so what you may need needed to put into the context half a 12 months in the past may not even be needed anymore.

Transparency about how full the context is, and what’s taking on how a lot area, is an important function within the instruments to assist us navigate this steadiness.

Example of Claude Code's /context command result, giving transparency about what is taking up how much space in the context

Nevertheless it’s not all as much as us, some coding agent instruments are additionally higher at optimising context below the hood than others. They compact the dialog historical past periodically, or optimise the way in which instruments are represented (like Claude Code’s Instrument Search Instrument).

Instance: Claude Code

Right here is an outline of Claude Code’s context configuration options as of January 2026, and the place they fall within the dimensions described above:

  What Who When to make use of / issues to know Instance use instances Different coding assistants
CLAUDE.md Steerage Claude Code – At all times used at begin of a session For many ceaselessly repeated common conventions that apply to the entire undertaking – “we use yarn, not npm”
– “don’t neglect to activate the digital setting earlier than working something”
– “after we refactor, we don’t care about backwards compatibility”
Mainly all coding assistants have this function of a major “guidelines file”; There are makes an attempt to standardise it as AGENTS.md
Guidelines Steerage Claude Code, when recordsdata on the configured paths have been loaded Helps organise and modularise steerage, and due to this fact restrict dimension of the all the time loaded CLAUDE.md. Guidelines may be scoped to recordsdata (e.g. *.ts for all TypeScript recordsdata), which suggests they may then solely be loaded when related. – “When writing bash scripts, variables needs to be known as ${var} not $var.” paths: **/*.sh Increasingly more coding assistants permit this path-based guidelines configuration, e.g. GH Copilot and Cursor
Slash instructions Directions Human Frequent duties (evaluation, commit, take a look at, …) that you’ve a selected longer immediate for, and that you just wish to set off your self, inside the primary context *DEPRECATED in Claude Code, superceded by Abilities* /code-review
/e2e-test
/prep-commit
Frequent function, e.g. GH Copilot and Cursor
Abilities Steerage, directions, documentation, scripts, … LLM (based mostly on ability description) or Human In its easiest type, that is for steerage or directions that you just solely wish to “lazy load” when related for the duty at hand. However you possibly can put no matter further sources and scripts you need right into a ability’s folder, and reference them from the primary SKILL.md to be loaded. – JIRA entry (ability e.g. describes how agent can use CLI to entry JIRA)
– “Conventions to comply with for React elements”
– “Easy methods to combine the XYZ API”
Cursor’s “Apply intelligently” guidelines have been all the time a bit like this, however they’re now additionally switching to Claude Code fashion Abilities
Subagents Directions + Configuration of mannequin and set of obtainable instruments; Will run in its personal context window, may be parallelised LLM or Human – Frequent bigger duties which might be appropriate for and value working in their very own context for effectivity (to enhance outcomes with extra intentional context), or to cut back prices).
– Duties for which you normally wish to use a mannequin aside from your default mannequin
– Duties that want particular instruments / MCP servers that you just don’t wish to all the time have obtainable in your default context
– Orchestratable workflows
– Create an E2E take a look at for the whole lot that was simply constructed
– Code evaluation accomplished by a separate context and with a special mannequin to present you a “second opinion” with out the luggage of your unique session
– subagents are foundational for swarm experiments like claude-flow or Fuel City
Roo Code has had subagents for fairly some time, they name them “modes”; Cursor simply received them; GH Copilot permits agent configuration, however they will solely be triggered by people for now
MCP Servers A program that runs in your machine (or on a server) and offers the agent entry to information sources and different actions through the Mannequin Context Protocol LLM Use if you wish to give your agent entry to an API, or to a instrument working in your machine. Consider it as a script in your machine with plenty of choices, and people choices are uncovered to the agent in a structured manner. As soon as LLM decides to name this, the instrument name itself is normally a deterministic factor. There’s a development now to supercede some MCP server performance with abilities that describe how you can use scripts and CLIs. – JIRA entry (MCP server that may execute API calls to Atlassian)
– Browser navigation (e.g. Playwright MCP)
– Entry to a information base in your machine
All frequent coding assistants assist MCP servers at this level
Hooks Scripts Claude Code lifecycle occasions Whenever you need one thing to occur deterministically each single time you edit a file, execute a command, name an MCP server, and so on. – Customized notifications
– After each file edit, test if it’s a JS file and in that case, then run prettier on it
– Claude Code observability use instances, like logging all executed instructions someplace
Hooks are a function that’s nonetheless fairly uncommon. Cursor has simply began supporting them.
Plugins A option to distribute all or any of this stuff     Distribute a typical set of instructions, abilities and hooks to groups in an organisation  

This looks as if quite a bit – nevertheless, we’re in a “storming” section proper now and will definitely converge on an easier set of options. I count on e.g. Abilities to not solely take in slash instructions, but additionally guidelines, which would cut back this desk by two rows.

Sharing context configurations

As I stated at first, these options are simply the muse for people to do the precise work and filling these with affordable context. It takes fairly a little bit of time to construct up an excellent setup, as a result of it’s a must to use a configuration for some time to have the ability to say if it’s working properly or not – there are not any unit assessments for context engineering. Due to this fact, persons are eager to share good setups with one another.

Challenges for sharing:

  • The context of the sharer and the receiver must be as comparable as doable – it really works quite a bit higher within a workforce than between strangers on the web
  • There’s a tendency to overengineer the context with pointless, copied & pasted directions up entrance, in my expertise it’s finest to construct this up iteratively
  • Completely different expertise ranges may want completely different guidelines and directions
  • If in case you have low consciousness of what’s in your context since you copied quite a bit from a stranger, you may inadvertently repeat directions or contradict present ones, or blame the poor coding agent for being ineffective when it’s simply following your directions

Beware: Phantasm of management

Regardless of the title, in the end this isn’t actually engineering… As soon as the agent will get all these directions and steerage, execution nonetheless depends upon how properly the LLM interprets them! Context engineering can positively make a coding agent simpler and improve the likelihood of helpful outcomes fairly a bit. Nonetheless, generally folks speak about these options with phrases like “guarantee it does X”, or “stop hallucinations”. However so long as LLMs are concerned, we are able to by no means be sure of something, we nonetheless have to suppose in possibilities and select the best degree of human oversight for the job.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles