The Architecture Decisions You’re Already Making — Luminity Digital
Applied AI · Pattern  ·  Dispatch  ·  Context Engineering  ·  July 2026
Applied AI — Pattern

Context Engineering: The Governed Window

An agent’s context window is not a container to be filled. It is a finite attention budget to be governed — and the levers that govern it (what enters, what leaves, what persists) are structural decisions the architect makes against governed artifacts, not behaviors the model discovers on its own.

July 2026 Tom M. Gomez Luminity Digital 10 Min Read
A companion to the self-serve pipelines dispatch, which argued that safety in a business-user workflow comes from generating against a data contract. The same instinct governs the layer beneath it: an agent’s context window is a resource to be curated, and the curation is a set of structural decisions made against governed artifacts. This dispatch names those decisions and the Anthropic primitives that implement them.

The reflex when an agent underperforms on a long task is to reach for a larger context window. It is the wrong lever.

A model’s usable attention does not scale with the tokens you hand it; past a point, additional context degrades recall rather than improving it — the effect Anthropic and others call context rot.[1] Treating the window as free storage is how capable agents lose the thread on hour-long work. The discipline that fixes it has a name now: context engineering, the practice of curating the smallest set of high-signal tokens that will produce the outcome you want.[1]

The window is a finite resource

Anthropic frames context as an attention budget — a transformer attends every token to every other token, so each token added dilutes the focus available to the rest.[1] That reframing is the whole argument in miniature. Once the window is a budget rather than a bucket, every design question becomes an allocation question: what earns its place in context, what should be evicted, and what should live somewhere the window can reach but does not have to hold. Three moves answer those questions — and each one is the model operating against a structure the engineer defined, not the model deciding on its own.

What enters: progressive disclosure

Progressive disclosure is the discipline of loading context on demand instead of upfront. Its cleanest expression is Agent Skills: a skill exposes only its name and description at startup, loads its full instructions when the task calls for it, and pulls bundled reference files only when a specific sub-task needs them.[2] The context a skill can carry is effectively unbounded because almost none of it is resident until it is relevant.[2][3] The same principle governs tools. Rather than load hundreds of tool definitions into every request, the agent reads them from a filesystem or a search interface on demand — the code-execution-with-MCP pattern, which trades a small amount of latency for a large reduction in baseline context.[4] Anthropic’s tool-context guidance composes the levers explicitly: tool search to keep definitions out of the window, and programmatic tool calling to collapse a chain of calls into one sandboxed script whose intermediate results never enter the conversation.[5]

What the tool returns matters as much as whether it loads. Anthropic’s tool-writing guidance is a context-engineering document in its own right: return high-signal fields rather than raw identifiers, keep responses token-efficient, and namespace tools so an overlapping surface does not crowd the window or confuse selection.[13] A tool’s output is context the engineer chose to admit; designing that output is a disclosure decision, not an afterthought.

What leaves: clearing and compaction

Admission is half the discipline; eviction is the other half. The lightest move is clearing — once a tool result deep in the history has been processed, the raw payload is dead weight, and the platform can drop it in place, leaving a marker so the model knows something was removed.[1][7] Context editing implements this server-side for tool results and for older thinking blocks.[7] The heavier move is compaction: when the window approaches its limit, the conversation is summarized and reinitialized from that summary, preserving decisions and open threads while discarding redundant turns.[6] Anthropic positions server-side compaction as the primary strategy for long-running work, with clearing as the finer-grained complement.[9] The gains are measurable — on an internal agentic-search evaluation, context editing alone improved task performance by twenty-nine percent, editing plus a memory store by thirty-nine, and a hundred-turn search run completed with eighty-four percent fewer tokens than the uncurated baseline.[8] The art is in the summarization prompt: what a compaction keeps versus discards is itself a governed artifact, tunable to what a given agent must not forget.[6]

What persists: memory out of band

Some state should survive the window entirely. The memory tool gives an agent a file-backed store it can write to and read from across sessions, so a finding established in one session is available in the next without re-deriving it.[10] Memory is the out-of-band tier: it does not compete for the attention budget, and it is where cross-session knowledge accumulates. Paired with clearing, it lets an agent preserve the conclusion of a bulky tool result to a memory file before the raw result is cleared — durable signal retained, transient volume released.[10]

One discipline, three moves

The three moves are complementary, and Anthropic’s own mental model keeps them distinct: compaction compresses the whole window when it grows too large, clearing drops stale re-fetchable data inside the window, and memory moves information out of the window so it survives across sessions.[11] At the scale of work that spans many windows, these primitives graduate into a harness — an initializer that establishes a structured environment and a working agent that leaves clear artifacts each session, so progress bridges the gap between context resets.[12] The pattern is consistent from a single skill to a multi-day harness: the model performs against a structure the architect governs.

The Hard Claim

The reliability of a long-running enterprise agent is an artifact of how its context is governed, not how large its window is. Every lever is the engineer deciding what the model sees — the skill contract that gates disclosure, the tool surface that shapes what returns, the compaction prompt that defines what survives, the memory schema that decides what persists.

That places assurance in the governed structure the model operates against — which is what makes context engineering a workflow-pattern property, not a model-capability one. You do not get a defensible agent by buying a bigger window. You get one by governing a smaller one.

The Window Is a Governed Resource. Design the Curation, or Inherit What the Defaults Produce.

If you are architecting agentic systems and want a practitioner conversation about governing the context layer, the calendar is open.

Start the conversation
References & Sources

Share this:

Like this:

Like Loading…