Contents
- The Short Answer
- All 5 Causes at a Glance
- Cause 1: The Workflow Does Not Start With a Chat Trigger
- Cause 2: You Ran the Agent Without Chat Input
- Cause 3: A Node Sits Between the Chat Trigger and the Agent (Before n8n 1.110.0)
- Cause 4: The Agent Runs in a Sub-Workflow
- Cause 5: The sessionId Is Inside the Webhook Body
- Related Messages From the Same Code
- Still Broken? A Checklist
- How to Stop It Coming Back
- Where This Fits
- Sources
- FAQ
The Short Answer
"No session ID found" is thrown by the memory sub-node of an AI Agent, not by the agent itself. The full message in the n8n source, helpers.ts, is:
No session ID found
Expected to find the session ID in an input field called 'sessionId' (this is what the chat trigger node outputs). To use something else, change the 'Session ID' parameter
That description is the diagnosis. Memory nodes such as Simple Memory and Postgres Chat Memory have a Session ID parameter with two options:
- Connected Chat Trigger Node (the default): reads
sessionIdfrom the input. - Define below: you set a Key, as static text or an expression.
Only the Chat Trigger outputs sessionId. With a Webhook, Telegram, WhatsApp, Schedule or Manual Trigger, the default fails. Choose Define below with a value unique per conversation.
All 5 Causes at a Glance
| Symptom | Cause | Fix | How to confirm |
|---|---|---|---|
| Fails on every run, workflow starts with Webhook, Telegram or WhatsApp | Session ID left on Connected Chat Trigger Node without a Chat Trigger | Define below, Key = user or chat ID | Trigger output has no sessionId field |
| Fails only when you run the agent from the editor | Test run without chat input: Execute step, Manual Trigger or pinned data | Test through the chat, or pin data with a sessionId | Works when you send a message in the chat panel |
| Fails on a second agent or after a Set or HTTP node, on older n8n | Before 1.110.0 the node read only $json.sessionId from the node directly before it | Upgrade, or Define below pointing at the Chat Trigger | Your n8n version is below 1.110.0 |
| Fails inside a sub-workflow called as a tool | The sub-workflow has no Chat Trigger and was not passed the ID | Add a sessionId input and pass it from the parent | The sub-workflow starts with When Executed by Another Workflow |
| Webhook payload has a sessionId, still fails | The field is under body, so $json.sessionId is empty | Define below, Key = $json.body.sessionId | The Webhook output shows body.sessionId |
Cause 1: The Workflow Does Not Start With a Chat Trigger
The common case, as in the "AI Agent Error in sub-node 'Simple Memory'" thread: a chat template's Chat Trigger is swapped for a Telegram or WhatsApp trigger, and the memory stays on its default.
How to confirm it: open the trigger's output. If there is no top-level sessionId, this is your cause.
The fix: set Session ID to Define below and Key to an expression that is constant within a conversation and different between conversations. Use your own node names:
// Telegram Trigger: one memory per chat
{{ $('Telegram Trigger').item.json.message.chat.id }}
// WhatsApp Trigger: one memory per sender's number
{{ $('WhatsApp Trigger').item.json.messages[0].from }}
// Webhook: an ID your caller sends in the body
{{ $('Webhook').item.json.body.userId }}
Current n8n converts a number to text for you, so a numeric Telegram chat ID is fine. Objects and arrays are rejected with "Invalid session ID: The session ID must be a text value".
A fix that hides the problem: the Simple Memory docs suggest a static key such as my_test_session for testing only. Live, every user would share one conversation.
If the agent's Prompt is also on Connected Chat Trigger Node, No prompt specified comes next: set it to Define below too. The Telegram AI agent tutorial shows both settings in a working build.
Cause 2: You Ran the Agent Without Chat Input
The workflow does start with a Chat Trigger, and it works when you chat with it. It fails when you click Execute step on the agent, run it from a Manual Trigger, or use pinned data from another node.
The memory node reads $json.sessionId, then falls back to the workflow's Chat Trigger. If the Chat Trigger did not run, there is nothing to read.
How to confirm it: open the chat panel, send a message, and see whether the same workflow succeeds.
The fix: test agents through the chat. If you need pinned data, include the fields the Chat Trigger produces:
{
"sessionId": "test-session-1",
"action": "sendMessage",
"chatInput": "What are your opening hours?"
}Cause 3: A Node Sits Between the Chat Trigger and the Agent (Before n8n 1.110.0)
The "How to route sessionID to a Postgres Chat Memory node?" thread: two chained agents, and the second agent's input was the first agent's output, with no sessionId. A Set or HTTP Request node between trigger and agent does the same.
The source shows when this changed. Up to n8n 1.109, the memory node only evaluated $json.sessionId. From n8n 1.110.0 it falls back to the Chat Trigger in the workflow, so this layout now works without changes.
How to confirm it: check your n8n version. The error details include it as n8nVersion.
The fix: upgrade. If you cannot, set the second memory node's Session ID to Define below and reference the Chat Trigger directly:
{{ $('When chat message received').item.json.sessionId }}
Replace the name with your Chat Trigger's name on the canvas.
Cause 4: The Agent Runs in a Sub-Workflow
This is the "No session ID found when calling on other agents" thread, which has no accepted answer. A main agent calls a second agent in another workflow through the Call n8n Workflow Tool. That workflow starts with When Executed by Another Workflow and has no Chat Trigger.
How to confirm it: the failing memory node is in a workflow whose trigger is the Execute Sub-workflow Trigger.
The fix: pass the ID in, as the thread's one reply describes:
- In the sub-workflow's trigger, set Input data mode to Define using fields below and add a string field named
sessionId, next to the task text. - In the parent's Call n8n Workflow Tool, the field appears under Workflow Inputs. Set it with an expression, not with
$fromAI(), because the model should not invent a session ID:{{ $('When chat message received').item.json.sessionId }} - In the sub-workflow's memory node, choose Define below and set Key to:
{{ $('When Executed by Another Workflow').item.json.sessionId }}
Use your trigger names as they appear on each canvas. To keep the sub-agent's notes apart from the main agent's, add a suffix such as -researcher to the key.
Cause 5: The sessionId Is Inside the Webhook Body
Your own front end sends sessionId and the error still appears. The Webhook node puts the request body under body, so the value is at $json.body.sessionId, not $json.sessionId.
How to confirm it: in the Webhook node's output, the ID is nested under body.
The fix: Define below with:
{{ $('Webhook').item.json.body.sessionId }}
Or add an Edit Fields (Set) node that copies body.sessionId to a top-level sessionId. Our n8n chatbot with AI Agent guide uses that normalising step.
Still Broken? A Checklist
- Open the error details on the memory node and note the exact message.
- Look at the input the memory node received. Is there a top-level
sessionId? - If not, is Session ID set to Define below?
- Does the Key preview show a real value, not empty or
[object Object]? - Do the node names in your expression match the canvas exactly?
- In a sub-workflow, is
sessionIddefined as an input and filled by the parent? - Is the memory node old, from a template? Delete it and add a fresh one.
How to Stop It Coming Back
Decide the session key on purpose. For every agent, write down what one conversation is: a Telegram chat, a WhatsApp number, a ticket ID. Use that, never a static string, in anything live.
Normalise at the top. One Edit Fields node after the trigger that sets sessionId and the message text means every agent and memory node downstream reads the same fields.
Use persistent memory in production. Simple Memory lives inside the n8n instance and its notice says it is not compatible with queue mode or multi-main setups. Postgres Chat Memory stores history in a table, n8n_chat_histories by default, so you can query it when a user says the bot forgot them.
Do not rename memory nodes casually on 2.20.0 and later if they use the automatic session ID.
Prove isolation with two test users before going live.
Where This Fits
Memory, session keys and tools are what turn a model call into an agent. The free lesson The AI Agent Node Explained covers how the agent and its sub-nodes fit together, and our post on A Chat Model sub-node must be connected covers the model connector. For the concepts, see context window and multi-agent systems.
The n8n AI Agents course goes from there to chat workflows, giving agents tools, reusable sub-workflow tools, memory that keeps users apart, webhooks and triggers, RAG, error handling and human fallback, with an exercise that proves two users cannot see each other's history.
Sources
Checked against n8n's documentation, source code and community forum on 17 November 2026.
- n8n source: helpers.ts - the error text, the Chat Trigger fallback, Key parameter is empty, Invalid session ID and session scoping. Version boundaries checked against release tags 1.109.0, 1.110.0, 2.19.0 and 2.20.0.
- n8n pull request 28675 - scoping memory session IDs to a single memory node.
- n8n docs: Simple Memory common issues - managing the session ID and the static test key.
- n8n docs: AI Agent common issues - Error in sub-node Simple Memory and No prompt specified.
- n8n docs: Execute Sub-workflow Trigger and Call n8n Workflow Tool - input fields and Workflow Inputs.
- n8n community: No session ID found when calling on other agents.
FAQ
- What does "No session ID found" mean in n8n?
- The memory node attached to your AI Agent is set to Connected Chat Trigger Node and found no sessionId field in its input. Only the Chat Trigger outputs that field. Set Session ID to Define below and give it a key that identifies the conversation.
- What should I use as the session ID for a Telegram or WhatsApp bot?
- Something constant per conversation. For Telegram, the chat ID: {{ $('Telegram Trigger').item.json.message.chat.id }}. For WhatsApp, the sender's number: {{ $('WhatsApp Trigger').item.json.messages[0].from }}. Use your own node names.
- Why does my agent show "Error in sub-node 'Simple Memory'"?
- That is the wrapper the agent shows when its memory sub-node fails. Open the details for the real message, often No session ID found. The AI Agent docs also name an outdated Simple Memory node from a template; delete it and add it again.
- How do I pass the session ID to an agent in a sub-workflow?
- Add a sessionId field to the sub-workflow trigger using Define using fields below, set it in the parent's Call n8n Workflow Tool Workflow Inputs with an expression, and point the sub-workflow memory node's Key at that field.
- Can I use a fixed session ID?
- For testing only. n8n's Simple Memory docs suggest a static key such as my_test_session while testing. In a live workflow every user would share one conversation history.
- Why did my agent's memory reset after I renamed the memory node?
- From n8n 2.20.0, memory nodes at version 1.4 add the node's name to an automatic session ID. A new name means a new key and an empty history. Use Define below with an explicit key if names may change.
- Do two memory nodes in one workflow share history?
- On version 1.4 memory nodes with the automatic session ID, no: each is scoped to its own node name. To share, set both to Define below with the same key. Older node versions shared by default.
If this resonated
Module 02 is the long version of this post.
Eval set, refusal pattern, kill switch. Build it in a weekend.
