Published on

The Agent Harness Is Eating Your Context Window

Authors
  • avatar
    Name
    Ptrck Brgr
    Twitter

Many coding-agent harnesses consume part of the context they are designed to manage. That cost is real, and it gets charged on every turn.

Before an agent reads an issue, opens a file or runs a test, many harnesses have already spent context on tool schemas, workflow rules, task frameworks, coordination instructions and policy text. An emerging alternative takes the opposite position: keep the core small, expose a narrow tool surface, and load capabilities only when the task requires them.

The Context Tax

A Databricks benchmark puts a number on that design choice. In one of several harness-model combinations they tested, the leaner Pi harness used roughly 3× less context per turn and delivered more than 2× lower task cost at comparable quality. That is a data point, not a universal law — but it is an important one.

Efficiency Is the Obvious Story. Control Is the Real One.

The obvious takeaway is efficiency. The deeper enterprise implication is control.

At enterprise scale, we will increasingly operate many agent workflows across repositories, data products and operational workflows. Every static tool definition, permanent instruction and duplicated policy can be replicated across thousands of turns. Harness design therefore becomes platform economics. It also becomes governance.

My lens here is enterprise, so take it with that filter — but if every team builds its own agent wrapper, with a different tool set, permission model, system instruction and safety prompt, we do not have an agent platform. We have a fleet of fragmented runtimes, each with its own policy boundary, cost profile and interpretation of what it is allowed to do.

What a Shared Runtime Layer Looks Like

The answer is not a giant enterprise harness that exposes every integration to every agent. That simply moves the problem into the context window. A more durable answer is a thin, shared agent runtime layer:

  • A small invariant core: identity, audit, authorization and a durable trace.
  • Task-scoped capabilities: grant tools and data just in time, rather than advertising them permanently. Agents should discover approved capabilities at execution time, not carry the entire enterprise surface area in every prompt.
  • Context as a budget: retrieve evidence needed for the decision at hand; compact or discard the rest.
  • Deterministic gates: enforce critical rules in policy and code, not in prompt instructions that cannot provide guarantees.
  • Verification outside the actor: an agent should not be the final judge of its own work.

Anthropic's work on long-running agents highlights related principles: explicit state, structured handoffs and external verification become increasingly important as agents operate over longer horizons — not preserving an ever-growing conversation transcript.

The runtime should make the right action easy, the unsafe action impossible, and irrelevant context absent. Every team building its own harness is a team quietly deciding which of those three they are willing to skip.