Window Buffer Memory for AI Agent lost its chat history

Window Buffer Memory for AI Agent lost its chat history

I started a chat with my AI Agent, which is connected to the LLM Claude 3.5 (anthropic/claude-3.5-sonnet).

I had a converation back and forth, and took a break. I resumed my session after 3 hours, but then Claude wrote back telling me that it has no idea what we are talking about. It lost the context.

Ive never experienced this before, and expected the LLM to remember me

Question: is this a bug in my workflow, or a “feature” of Claude disregarding sessions after a certain period of time? Is there anything I can do to make the LLM remember me despite time lag?

I checked the execution log of the n8n workflow, and I can see that the Memory Window Buffer node has an empty chat history after my 3 hour break, which you can see in the second image below.

The chat (before and after the break) are using the same sessionId as input to the AI Agent node.

My Window Buffer Memory node has Context Window Length set to 50

Here is data from the execution log for the Window Buffer Memory Node

Information on your n8n setup

  • n8n version: 1.75.2
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
1 Like

Does anyone know, @Jon @netroy ? :blush::pray:

1 Like

Did you restart your instance by any chance? Window Buffer is Memory based and will be lost when the instance is reloaded.

1 Like

Great question. I left my n8n instance running (hosted on n8n cloud). My n8n was untouched during my break

1 Like

hi! In this case I recommend storing messages in an alternative database other that the temporary memory buffer.

Hope this helps!

3 Likes

Thanks for the suggestion. Ive replaced the Windows Buffer Memory with Postgres. Ill post in case the error persist, but probably it was a one-time error (all software have bugs), or the context was purged because the Windows Buffer Memory is a temporery buffer as you mention.

Thanks for getting back to me, I appreciate it!

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.