DEV Community

Jeff Reese
Jeff Reese

Posted on • Originally published at purecontext.dev

Externalizing State

Think about the last meeting you were in where you were responsible for tracking the agenda. Not just participating — owning the flow. Making sure every topic gets covered, decisions get captured, and nothing falls through the cracks.

Now think about how present you were during the actual discussions.

If you are like most people, the answer is: less present than you wanted to be. Part of your brain was always somewhere else. Checking the clock, scanning ahead to the next topic, making sure you did not forget the question someone asked three items ago. You were doing two jobs at once — tracking the process and doing the work — and both suffered for it.

This is cognitive overhead. Not the difficulty of the task itself, but the invisible tax of managing the state around the task. Where am I in the sequence? What has already happened? What comes next? What do I need to remember?

It is everywhere. Surgical teams use checklists not because surgeons forget how to operate, but because tracking dozens of sequential steps while performing complex procedures splits attention in dangerous ways. Externalize the tracking, and the surgeon can focus on the surgery.

The pattern is simple: when you externalize the tracking, the one responsible for doing the work gets better at its job. Not because it got smarter. Because it stopped splitting its attention.

The Same Problem Lives in AI

In my experience building AI-powered development tools — systems where AI agents handle complex, multi-step workflows autonomously — one of the first things I noticed was that the quality of an agent's work degrades as the complexity of the workflow increases. Not because the model lacks capability, but because it is spending context and attention on process management.

When an AI agent is responsible for both doing the work and tracking where it is in the process, the same thing happens that happens to you in that meeting. It gets less present. Context fills up with bookkeeping — what step am I on, what did the user say three steps ago, what are the constraints I need to carry forward. The model is not struggling with the task. It is struggling with the overhead of managing the task.

This is not a prompting problem. It is an architectural problem. An AI model's context window is finite. Every token occupied by process state is a token unavailable for the actual task. As bookkeeping accumulates, the context becomes polluted — less targeted, less relevant, less effective. The model is not just distracted. Its working environment is actively degraded.

Separating the Concerns

One of the tools I built addresses this directly. It has a flow engine — a separate system that owns process state entirely. Where are we in the workflow? What comes next? What has already been decided? The flow engine tracks all of it. The AI never has to.

After implementation, the result was immediate and striking. The AI became more responsive, more adaptive, more fault-tolerant. When something unexpected happened mid-workflow, it handled it better because it was not also trying to remember what step it was on. It could focus entirely on the problem in front of it.

The improvement had nothing to do with the model. Same model, same prompts, same capabilities. The only difference was what the AI was spending its attention on.

I see the same principle at work in a completely different system I built — a persistent memory layer for an AI collaborator. Instead of the AI trying to hold cross-session context in its working memory (and inevitably losing it), the system externalizes that state. Past decisions, ongoing threads, relationship context — all stored and retrieved when relevant, rather than carried as cognitive load.

Two very different tools solving the same fundamental problem: externalize the state so the processing capacity serves the work, not the bookkeeping.

A Design Principle, Not a Feature

This is not about any specific tool or implementation. It is a design principle for building AI systems that work at scale.

Many of the conversations around improving AI workflows focus on the model itself. Better prompts, larger context windows, smarter models. Those things matter, but they are optimizing the engine while ignoring the drag.

Every piece of state the model has to carry is context it can not use for the work. Every process checkpoint it tracks is attention diverted from the problem. The architecture around the model matters as much as the model itself.

This is context engineering — designing systems so that what reaches the model is lean, targeted, and relevant to the task at hand. Not just what you put in the prompt, but what you keep out of it. The best context is not the most context. It is the most refined context.

When I design AI systems now, the first question I ask is not "how do I make the AI smarter?" It is "what is the AI spending its attention on that is not the actual task?" One very common answer points to state management — and the fix is almost always the same. Externalize it. The less the primary thread carries, the sharper its context — and the better its work.

Top comments (0)