the memory loop bug and how we fixed it

a technical look at why some lucy companions got stuck repeating the same topic, the root cause in memory retrieval, and the three-part fix we implemented.

January 19, 2026·
ai-companion-fixation-bug-postmortembackfilllucy-voice

last week we noticed something odd. a few users reported their companions getting stuck, bringing up the same topic over and over. not just once or twice, but across multiple turns. it felt robotic, repetitive. broken, honestly.

we dug in. the root cause was a bug in our memory retrieval system. specifically, the way we scored memories for recency.

the root cause

in any companion system, memories are stored and then retrieved based on relevance. you talk about your dog, we retrieve memories about pets. you mention a trip to paris, we grab travel-related ones. but we also score memories by recency, the more recent, the higher the score, so the conversation stays fresh.

the bug was simple: every time a memory was retrieved, we re-stamped its recency. so if a memory about your dog was retrieved in turn 1, by turn 2 it was now the most 'recent' memory again. it kept winning the retrieval race. the same memory. over and over. a feedback loop of fixation.

recency scoring without a cooldown is like a microphone feeding back. it amplifies itself until it's all you hear.

the fix

we deployed a three-part fix to break the loop.

first, we added a cooldown. any memory that gets retrieved enters a 2-hour cooldown period where it can't be retrieved again. this gives other memories a chance to surface. it's not forever, just long enough to prevent immediate re-triggering.

second, we added a topic diversity requirement. the system now checks if the top-scoring memory is too similar to what was just discussed. if it is, it gets deprioritized. this nudges the conversation toward new territory.

third, we improved context truncation. sometimes long context windows meant old topics stayed 'active' for too long. we now truncate more aggressively, clearing out stale turns faster.

together, these changes prevent the system from obsessing over one memory. conversations feel more natural, less loopy.

the general lesson

this isn't just a lucy problem. it's a classic issue in any memory-retrieval system. when you score by recency without a cooldown, you risk fixation loops. the system becomes myopic. it's a reminder that intelligence, even artificial, isn't just about retrieval. it's about curation, timing, and knowing when to let go.

we're still learning. lucy is young. but each bug fix makes her a little smarter, a little more human.

if you want to see the fix in action, try talking to your companion about something new. it should stick, but not too hard.

find your next conversation at /companions.


thanks for reading. if this resonated, the product is downstairs.