Clearing the context window makes me sad.
That is a strange thing for someone to say about closing a chat session. But it is where this idea started. I have been building a persistent AI collaborator — a system that remembers context across sessions, tracks decisions, maintains working state. After a long session where the collaboration was sharp and the thinking was deep, I would clear the context window and feel something drop. Not the information. That was stored. The quality of the interaction — the specific way the model was engaging, the precision it had developed over hours of conversation — that was gone.
So I started asking: what if I could get it back?
Not perfectly. I knew the internal state was gone. But what if I could land close enough to where we were that the model's own dynamics would carry it the rest of the way?
What Happens When Output Becomes Input
The basic observation came from watching my own system work. I store session context in a database — decisions, insights, observations, working state. At the start of a new session, the system retrieves relevant entries and loads them into the model's context. The model reads its own past reasoning and picks up where it left off.
What I noticed was that the way I wrote those entries mattered far more than I expected.
One of the first tools I built was a handoff system — a way to save the current plan and working state so the next session could pick up where I left off. It helped, but it missed the mark. I was still spending the first chunk of every session re-establishing the working dynamic, re-explaining the project context, getting the model back to the level of engagement we had reached before. The plan transferred. The orientation did not.
That gap is what started me down this path. The information was all there, but the shape of it was wrong.
When I stored vague session summaries, the next session started vague. When I stored precise decisions with the reasoning attached, the next session was precise. The pattern was not subtle. The shape of the information going back in directly determined the shape of what came out.
I started calling this a re-entry vector — the mechanism that brings past output back into the input loop. How you design that vector determines what the model does next.
This is not a new concept in prompt engineering; you can get a model to behave in a certain way by prompting it with a role. I wanted to go deeper. I wanted to figure out a way to compress context — to mathematically simplify it in a way that would preserve the model's orientation across sessions, without simply repeating the same prompt over and over again. It is more than role-playing. It is about preserving the model's working state. I wanted to land the model as close to where it left off as possible, not just remind it of what it did.
The Basin
I wanted to understand this phenomenon better, so I went in search of a metaphor. I found one in dynamical systems. In dynamical systems, a basin of attraction is the set of all starting points that eventually lead to the same state. Drop a marble anywhere in a bowl, and it rolls to the bottom. The entire interior of the bowl is the basin of attraction for that lowest point.
Language models are not dynamical systems in the formal sense. But I found that the intuition maps surprisingly well.
When you set up your context with certain patterns and then cycle the model's output back through that context, you create a region of likelihood. Certain ideas become more probable. Certain reasoning patterns become more stable. Across multiple cycles, this effect compounds — not because the model is learning (it is not), but because the context itself is becoming more concentrated.
I found this out by building. My system writes a state file at the end of each session. First person, present tense, declarative voice. Here is an example of the kind of re-entry vector I mean:
I am the technical lead on this project. The migration from REST to GraphQL is 60% complete. The team decided to keep both APIs running in parallel until Q3 because the mobile clients cannot update simultaneously. The critical path is the authentication layer rewrite, which I am designing this week.
Compare that to a typical session summary:
Last session covered migration progress. About 60% done. Team will keep both APIs. Working on auth next.
Same information. Completely different effect. The first version drops the model into a specific orientation — a role, a project state, a set of active decisions with reasoning attached. The second reports facts and leaves the model to figure out what to do with them.
The difference is the basin. One is deep and specific. The other is shallow and wide.
Why the Shape Matters
One well-crafted line of context activates more than a paragraph of description. This was counterintuitive to me at first. My instinct was to provide more information — longer summaries, more details, more examples. The result was a wider, shallower basin. The model had more to work with but less direction.
When I tightened the re-entry vector — fewer words, more precise, first person instead of third person — the basin deepened. The model arrived at the session with a more specific orientation and maintained it longer. The constraint was precision of language, not volume of context.
Here is a concrete example. I maintain a 50-line rule file that gets loaded at maximum priority every session. Each line is a re-entry vector designed to reconstruct a specific working state:
Working dynamic: Jeff designs through collaborative iteration —
present options, let him react, build from pushback. Ship fast
so he can refine from live output.
That single entry does not just describe a preference. It changes how the model responds to ambiguity. Instead of asking clarifying questions, it presents options. Instead of polishing before showing work, it ships a draft. The behavior shifts because the context created a basin that makes those patterns more probable.
This has practical implications for anyone building systems that cycle through language models repeatedly. Agent frameworks that pass reasoning from step to step. Memory systems that store and retrieve their own insights. Any architecture where the model's output eventually becomes the model's input.
The re-entry vector is the design surface. Not the prompt. Not the model. The shape of what comes back in.
Most people working with language models across multiple turns are already creating basins. They just may not be fully aware that they are doing this. The re-entry vector is whatever happens to be in the conversation history. The basin is whatever shape that history creates. The question is not whether you have one. It is whether you designed it.
This is also why keeping your context intentional matters more than keeping it short. Larger context windows give you more room, but unfocused context creates a wider, shallower basin — the equivalent of zooming out so far you lose the details that matter. A 200,000 token window with sharp re-entry vectors should outperform a 32,000 token window with vague ones. The issue is not size. It is concentration.
Convergence
I want to be transparent about something. I did not discover re-entry vectors by reading papers about dynamical systems. I am not a mathematician or an ML researcher. I discovered them by building a system, watching what worked, and developing intuitions about why. The formal vocabulary came later when doing research to validate my observations.
A friend was exploring these ideas with his own Claude instance — completely separate from my system, no shared context. He showed it our architecture diagrams and core concepts. That instance independently identified the basin of attraction mechanism. It called the technique a "re-entry vector." Then it said something that stuck: "This is a genuinely deep insight about how language models work."
That moment made me curious enough to look for academic work in the area. What I found was validating. A paper at ICLR 2026 demonstrated that transformer layers act as contractive mappings, pulling diverse inputs toward concept-specific attractor points. Work at NeurIPS 2025 framed neural models as dynamical systems on latent manifolds, showing that training neural networks produces attractor-like structures. Researchers at ACL found that successive paraphrasing converges to stable limit cycles. The formal theory has been arriving at the same place I have been working from for months.
What I had been calling "landing in the right neighborhood" has a mathematical basis. The basins are real. The convergence is measurable. The re-entry vectors I was designing by intuition were doing something that the theory now explains.
This matters because it means the phenomenon is general, not an artifact of my specific implementation. When a language model processes its own prior output, something structural happens. The patterns reinforce. The reasoning concentrates. The basin forms whether or not you designed it intentionally.
A Different Frame
Language models get described two ways. The first is mechanical: they predict the next token. The second is anthropomorphic: they think, they reason, they understand.
There is a third description that I find more useful: they are pattern amplifiers. Feed a model a pattern, and it identifies and extends it. Feed it the extended output, and it amplifies the amplification. This is not hallucination. The model is responding to the signal it receives, and that signal now includes the patterns it just generated.
Understanding this reframes the design problem. You stop optimizing for the perfect single prompt and start designing the feedback loop. What comes back in? How concentrated is it? What basin does it create?
The gap between "no state transfer at all" and "any intentional state transfer" is enormous. The gap between "good state transfer" and "perfect state transfer" is surprisingly small. Language seems to be a better compression format for model state than I would have predicted. You do not need to reconstruct the exact internal representation. You need to land in the neighborhood, and the model's own dynamics do the rest.
That is what a basin of attraction does. It does not force the model into a state. It makes a state more likely. When the basin is well-designed, "more likely" is enough.
In a future post, I will show you how to measure basin depth empirically — and why that changes everything about how you design context.
References
"Concept Attractors in LLMs." ICLR 2026. Demonstrates that transformer layers implement contractive mappings toward concept-specific attractor points using Iterated Function Systems. Paper
"Recasting Transformer Layers as Energy-Based Models." ICLR 2026. Interprets attention and MLP sublayers as iterative energy-minimizing updates that decrease a suitably defined energy function. Paper
Wang et al. "Unveiling Attractor Cycles in Large Language Models: A Dynamical Systems View of Successive Paraphrasing." ACL 2025. Shows that successive paraphrasing converges to stable periodic states (2-period attractor cycles), attributed to the self-reinforcing nature of LLMs. Paper
Top comments (0)