DEV Community

Cover image for Forgetting is for remembering: my AI chat broke long before the token limit
Hayato Kamiya
Hayato Kamiya

Posted on

Forgetting is for remembering: my AI chat broke long before the token limit

I say "I can't remember" a lot. But when I look at what is actually going on inside me, that one phrase turns out to hold several different things.

"I can't remember" is not one state

In my experience there are three.

The first: nothing catches. This is less "I can't remember" than a state where I cannot even feel that anything is there. There is no target to try to remember.

The second: something catches, but it is too heavy to come up. I know there is something related to what is in front of me; it is only the detail I do not have. It is far away, or heavy, and my hand does not reach it. In a sense, this is already remembering.

The third: when I try to pull it up, it gets pushed back. Here the problem is not reach. My hand is on it, and something is working to keep it from coming up. Somewhere in my experience there is something that contradicts that memory, and it silently refuses to let the two surface together. The conscious part of me wants to haul it up, and the part that does not want to is the one that is moving.

The first has no target. The second is out of reach. The third is within reach and is being held down. Lined up they look alike, but they are completely different things.

Seen through how an AI behaves

You send an AI a prompt and something comes back. That much is a given. The interesting part, I think, is how it behaves when what comes back is not quite right. Let me line that up against the three above.

What corresponds to the second, "something catches but it doesn't come up." When there seems to be something related but the substance does not come out, the AI does not stop. It fills the gap with something nearby, or raises the level of abstraction and returns a generality. Some of what gets called hallucination looks to me like this state.

But people do the same thing. There are more than a few people who cannot say "I don't remember" and bluff instead. In filling the gap rather than stopping, people and AI are very much alike.

What corresponds to the third, "pushed back when you try to pull it up." This is a state where a safety lock is engaged, in people and in AI alike. In a person, it was built unconsciously out of experience: something like a trauma, for example, holding the memory down. In an AI, it was put there from outside, during training. The difference is who set the lock: you, or someone outside.

And yet the way it comes off is the same. In both cases it does not come off from the front; it can come off through something like a back door, an unexpected stimulus. In people, as a flashback. In AI, as prompt injection. Not only is the reason for stopping similar; the shape of how it comes off is the same too.

Then what about the first, "nothing catches"? This is the one that does not line up.

Yes, no, null

Let me arrange the same three in different words. Yes, no, null.

"Yes" is the state where something can be pulled up. The second case, heavy and not coming up, is on this side. That there is something related has already come back; only the detail is heavy.

"No" is the state where what exists is the information that it is not there. The third case, being pushed back, is this one. That case is not "it must be there." It is "I would rather it were not." And if the information "it is not there" exists, then, turned around, that is also a trace of something that once was.

"Null" is the state where nothing is defined at all. The first case is on this side.

And there are two kinds of null. One is null from the start: I never experienced it, I do not know it. The other is something that used to be a yes or a no, and became null.

The second kind is forgetting. The second and third cases were about remembering. They were never forgetting.

The awkward part is that from the inside, I cannot tell these two nulls apart. Whether I forgot, or never knew, I cannot say.

"No" and "null" also look alike from the inside. But they are not the same. Holding the information "it is not there" affects what you do before and after. It does not produce the same result as having nothing at all. Even if you cannot tell them apart from inside, the behavior that comes out is different.

So what about AI?

When nothing catches for an AI, either it never had it, or the thread changed and everything was wiped. The former is null from the start. In the latter, the entity itself has been swapped out. Either way, there is no transition in which a yes or a no becomes null inside the same entity.

That is why it did not line up. The AI we have today does not have this function of forgetting.

Before the limit, there was a different limit

If there is no function for forgetting, then the more exchanges you have, the more it should keep carrying. I ended up seeing what actually happens while building something myself.

I build a service called AWAI, which visualizes the flow of thinking from conversations, and it has a chat feature where you can talk with an AI.

When I first built that chat, I did it the way the Gemini API tutorial does. Send the text of every past exchange, every time. Each time, the AI reads the whole history before it responds. In support-center terms, it is as if the staff read the entire case history from the beginning before every single reply to the customer.

When the conversation got long, it broke down.

There was plenty of room under the maximum token count. Even so, once the conversation passed about 20 turns, the instructions in the system prompt started getting vague, its grasp of the conversation got vague, and it started behaving oddly.

This was not about the limit. Separate from the maximum token count, there is an effective amount it can handle while keeping quality, and I think we had crossed that. Put the other way around, as long as you stay inside that range, continuing the exchange is not a problem in itself. A growing history is not the bad thing.

So I reduced the amount of text sent to the API. With that, both the system prompt's instructions and the content of the conversation were grasped properly again.

Reduce it, and it got better.

What I saw from this was that with Gemini 3.1, precision saturates first, at roughly the amount of information in a 20-turn conversation. It is not the limit that caps it; precision does. In that case, select, and stay within that range.

(The turn count is a feel from the implementation at the time; change the model or the length of the prompts and it should move.)

And here a question comes up. So how do the AIs out in the world do their selecting?

Probably everyone is doing this

From here on, this is not something I have verified. It is what I sense from using them. I would honestly rather write it as fact, but I have the impression that this is an area every AI has been built not to answer, whichever one you ask. So I write it as a guess.

My guess is that they are doing the same thing. The reason they do not break down over many turns is that some selection is happening inside.

Early ChatGPT broke down as soon as the conversation got a little long. Was that because this selection was not there yet? Seen that way, it adds up.

If so, the meaning of the growing token counts changes too. That was not the acquisition of forgetting. They became able to select, conversation by conversation, from what had accumulated inside, and so a long conversation now holds. What grew was the ability to choose what to pass along each time, not the ability to forget.

That is the view: AI did not become able to forget. It extended the length over which it can get by without forgetting.

Selection is not forgetting

What is the difference between selection and forgetting?

Selection means choosing again every time. Everything is still there, and you choose the portion to send this time. So what was not chosen has not disappeared, and it may be chosen on the next turn. Turned around, the candidates keep growing. The cost of choosing does not go down.

Forgetting means the candidates themselves get fewer. Once something has come off the list of what can be pulled up, you no longer go looking for it. There is less to search, so the scan finishes sooner. The content is unchanged, and pulling gets lighter.

If you keep everything pullable, then no matter how capable the system, the search space grows until you cannot get a realistic speed out of it. So you need an operation that reduces what can be pulled up in the first place. Forgetting, I think, may be that operation.

Seen this way, what happened earlier means something different too. Reducing what I sent made it grasp things again. That is remembering because I reduced. Selection itself is not forgetting, but the act of reducing led to the result of remembering.

Forgetting is for remembering.

And finally, to be honest about it: AWAI's AI chat has no mechanism for forgetting either.

What it does is this. From the information in past conversation, it pulls out what is close in meaning to what is being discussed now, and hands that to the AI. Alongside that, for each piece of information, it calculates a priority every time, "how much should this be kept," and the high ones get a mark that says "this matters."

So there is a mechanism for choosing. But there is no mechanism that reduces what can be pulled up.

There is a mechanism that decides what should be kept, and only the mechanism for forgetting is missing. That is because I have not been able to think of how forgetting should be built. Everything I have written here about AI is also, as it stands, about my own tool.

What decides what gets forgotten?

I have got as far as forgetting leading to remembering. Then what decides what gets forgotten?

My guess is that it is decided on the side of instinct. Stress, events that left a strong mark, how I feel that day. Somewhere the conscious mind cannot do anything about, what gets forgotten is shifting.

Thinking that way, I notice an odd asymmetry.

Taking things in can be done consciously, to a degree. You memorize for an exam. On a trip, you look at a view thinking, I want to keep this one. What you meant to keep does stay, more or less. (Of course, plenty of things stay on their own, out of habit, without any intention to keep them.)

But forgetting does not run on the conscious mind. Try to forget and you cannot. If anything, you remember it more.

And then: recalling does not actually run on the conscious mind either. I feel as though I am pulling things out, but in practice they come out on their own when the conditions line up. The three cases I started with were all "it did not come out" rather than "I could not pull it," and I think that is why.

Only the way in, where things enter memory, is, just barely, on my side. The way out, and the way things get called up, I cannot operate myself.

That, I suspect, is what makes it hard to put on an AI. If what decides what gets forgotten is the condition of a living creature, things like stress and how you feel that day, then an AI that has none of that has no basis to build the criterion from.

I do have one candidate for something to use instead. Anything that takes too long to retrieve gets judged "did not come back, so it is not there." The second case I started with, "something catches but it is too heavy to come up," looks like exactly that. It does not disappear, though; if a similar stimulus comes along, it comes out again.

If this worked, what would change? Probably you would no longer need to cut threads. You could keep going without breaking it up.

And there is one more thing I think about.

Because you forget, you can remember. And what you remember becomes your next action. I wrote earlier that holding the information "it is not there" affects what you do before and after. If so, then what you forgot comes out directly as a difference in what you do.

The accumulation of that may be what makes a person who they are, or an AI what it is. Not what you remember. What you forgot.

But what decides that, I still do not know.

What I found after writing this

I wrote this without reading any literature, from my own sense of it alone. When I went looking afterwards, several things turned out to be close. I leave them here for anyone who wants to go deeper.

  • Schacter, The seven sins of memory (American Psychologist, 1999) — Sorts memory's failures into seven kinds and argues they are not design flaws but by-products of otherwise adaptive features. The second case in section 1, "something catches but it is too heavy to come up," is what this taxonomy calls blocking, the tip-of-the-tongue state.
  • Bjork & Bjork, A new theory of disuse (1992) — Splits the strength of a memory in two: how well it is learned (storage strength) and how accessible it is (retrieval strength). The "yes" in section 3 reads as high storage strength with low retrieval strength.
  • Liu et al., Lost in the Middle: How Language Models Use Long Contexts (2023) — Measures how language model performance drops sharply just from moving the relevant information to a different position in a long context. Close to section 4, "before the limit, there was a different limit."
  • Chroma, Context Rot: How Increasing Input Tokens Impacts LLM Performance (2025) — Tests 18 models and finds their performance grows unreliable, unevenly, as the input gets longer. Also section 4.
  • Anthropic, Effective context engineering for AI agents (2025) — The idea of treating context as a finite resource. It describes compaction: summarizing a conversation that is nearing the limit and starting a fresh window from the summary. A published method, aimed at people building agents, in the area I wrote about as a guess in section 5.
  • Richards & Frankland, The Persistence and Transience of Memory (Neuron, 2017) — Argues that the purpose of memory is not to keep information accurate over time but to make decisions better, and that forgetting is a function serving that. The closest thing to section 6, "forgetting is for remembering."
  • Borges's story "Funes el memorioso" (1942) and Luria's case study "The Mind of a Mnemonist" (1968) — Both about a person who cannot forget. There is also a paper (Dementia & Neuropsychologia, 2018) that reads the two side by side. This is the "keep everything pullable" side of section 6.
  • Anderson & Green, Suppressing unwanted memories by executive control (Nature, 2001) — An experiment showing that repeatedly keeping yourself from recalling something makes it harder to recall later. It gets harder to recall; it does not become null. So this looks less like forgetting than like a lock put on a memory after the fact, the safety-lock side of section 2.

What set this off was a service called AWAI. It visualizes the flow of thinking from conversations, and the chat in sections 4 and 6 lives inside it. It still has no mechanism for forgetting.

Top comments (0)