← Back to Blog

Tactical Specs and Context: Why an Agent Needs a Gameplan

November 1, 2026 · 4 min read
Tactical Specs and Context: Why an Agent Needs a Gameplan - Why coding agents need specs before writing code, how the Context Tax degrades reasoning past 40k tokens, and why session compaction saves projects.

The manager enters the locker room before the derby, claps his hands, and yells: “Press hard, win the ball, and score early! Let’s go!”.

The team runs onto the pitch. Twenty minutes in, the formation collapses: the right-back pushes too far forward and gets stranded, the midfielders collide in the center circle, and the striker runs himself ragged chasing shadows.

There was plenty of motivation, but zero gameplan.

Elite clubs operate differently. The manager pulls up the tactical board: “They set up with three at the back; their right side leaves space on transitions. Our plan: overload the left flank, pull their holding midfielder out, and slip the striker into the half-space.”

Every assignment is mapped out before a boot touches the turf.

Coding agents run into the exact same problem. If you hand an agent a broad prompt like “Build Stripe payments into the checkout flow”, it will make a mess of your repository in ten minutes.


The Reality

When an engineer throws a complex task at an agent in a single prompt, the model starts writing code blind.

It generates speculative files, breaks imports, tries to patch errors on the fly, and floods the session history with hundreds of lines of noise.

Disciplined context engineering enforces spec-driven workflows (RePPIT):

  1. Research: the agent scans the repo, locates callers, and maps dependencies.
  2. Propose: the agent writes a concise design proposal.
  3. Plan: the proposal turns into discrete steps with clear acceptance criteria.
  4. Implement: the agent writes code one step at a time.
  5. Test: the agent runs tests after each step before touching the next file.

Until an engineer approves the plan on the board, the model is not allowed to touch the code. That discipline prevents hours of manual git reverts.

The Why

The second hidden barrier is the Context Tax.

Data from thousands of production agent sessions shows a clear pattern: as context windows grow, reasoning degrades. Once conversation history climbs past forty thousand tokens, attention dilutes. The model begins skipping constraints from its system prompt and losing track of earlier decisions (the “Lost in the Middle” phenomenon). Worse, every subsequent turn costs significantly more.

That is why an agent needs a halftime break: Context Compaction.

At halftime, the manager does not replay all forty-five minutes of game footage to the squad. He wipes the board clean and writes three items: the score, the defensive mistake to fix, and the plan for the second half.

Session compaction works the same way: the agent harness discards intermediate tool outputs and scratchpad logs, keeping only the current repository state and the remaining task list.

Where does this break down?

Tool ergonomics.

Even a sound plan falls apart when tools dump garbage into the window. If an MCP tool returns a three-page stack trace instead of a concise message like “Rate limit hit, retry in 40s”, the context fills with noise on a single turn. Tools must return compact, structured payloads.

The Takeaway

Specifications save tokens and sanity: an agent must agree on the plan on the tactical board before taking its first touch in your codebase.


AI specialists call it: Spec-Driven Development / Context Tax / Context Compaction / RePPIT
In long-running agent interactions, bloated context windows degrade model instruction adherence through attention dilution and the “Lost in the Middle” effect, while linearly increasing inference latency and cost. Compaction summarizes dialogue history into an actionable state representation while trimming tool traces. Frameworks like RePPIT (Research, Propose, Plan, Implement, Test) decouple design validation from code execution to maintain narrow, high-precision context.

💬 Have you ever given a coding agent a large feature in a single prompt, only to spend the next hour cleaning up random files it created?

Part 2 of 10 | #CodingAgentsForHumans

Have a project in mind?

Let's talk about how we can help.

Got a project idea? →