[BUG] AI Agent Memory Tool "Memoire-court-terme" not persisting chatHistory - stays empty

Problem Description:

I’m experiencing a critical issue with the “Memoire-court-terme” (Short-term Memory) tool in my AI Agent workflow. The chatHistory remains empty ([ ]) across all interactions, causing my AI to lose conversation context and repeat questions.

Expected Behavior:
The chatHistory should accumulate previous messages and maintain conversation context between interactions.

Actual Behavior:

  • chatHistory: [ ] always empty
  • AI loses context after each message
  • Conversations restart from the beginning each time

Configuration:

Memoire-court-terme settings:

  • Session ID: {{ $(‘When chat message received’).item.json.sessionId }}
  • Context Window Length: 20 (tested with 20, 50, 100)
  • SessionID value: new for new conversation and then consistent across messages

Workflow structure:
When chat message received → AI Agent (with Memoire-court-terme) → Respond to Webhook

Logs showing the issue:

Input to Memoire-court-terme:
{
“action”: “loadMemoryVariables”,
“values”: {
“input”: “générer plus de prospects”,
“system_message”: “…”
}
}

Output from Memoire-court-terme:
{
“action”: “loadMemoryVariables”,
“chatHistory”: // ← ALWAYS EMPTY!
}

At the end:
{
“action”: “saveContext”,
“input”: {…},
“output”: {…}
}

What I’ve tried:

  1. :white_check_mark: Increased Context Window Length (20 → 50 → 100)
  2. :white_check_mark: Verified SessionID consistency across messages
  3. :white_check_mark: Checked workflow configuration multiple times
  4. :white_check_mark: Disabled conflicting memory tools (custom Supabase tools)
  5. :white_check_mark: Tested with minimal workflow (same issue)
  6. :white_check_mark: Recreated workflow from scratch (same issue)

Additional Context:

  • This exact workflow worked perfectly on a different n8n account previously
  • Same configuration, same credentials, different account = different behavior
  • The sessionID is properly generated and consistent
  • The saveContext action seems to execute but data doesn’t persist

Environment:

  • n8n version: Version 1.104.1 (on a VPS)
  • AI Agent tool with OpenAI Chat Model
  • Using webhook triggers for chat interface

Questions for the community:

  1. Has anyone experienced similar issues with the Memory tool not persisting?
  2. Are there known version differences in how Memory tools behave?
  3. Is there a configuration step I might be missing for proper persistence?
  4. Any debugging steps to troubleshoot memory persistence issues?
  5. Alternative approaches for maintaining conversation context in AI Agents?

Temporary workaround:
Currently considering reverting to custom Supabase-based memory management with proper session filtering.

Any help would be greatly appreciated! This is blocking a production chatbot deployment.

Just found the solution. My N8N was running on queue mode so obviously, it could not store the memory. Note for myself: read the N8N docs.