When I run Clear Session, I expect a new session ID. But the system keeps reusing the old one. The logging table, the Chat Trigger, and the AI Agent are all still writing messages under the original session ID instead of the new one.
Example:
Original session ID: d4bd51e81e304b14a5d187b98282e892
New session ID after reset: 74cb2dd438374079a278ec65f8b26055
Has anyone else had this happen or have ant ideas?
Please share your workflow
Share the output returned by the last node
Theoutput is included in screenshot (AI Agent)
Information on your n8n setup
n8n version: 1.118.2 (Latest Stable)
Database (default: SQLite): Using Postgres/Supabase with no memory enabled, but the problem still persists.
n8n EXECUTIONS_PROCESS setting (default: own, main): Not sure what this means.
Running n8n via (Docker, npm, n8n cloud, desktop app): Not sure what this means.
It appears there might be a bug or an issue with the state not being correctly reset on the backend when the “Clear Session” button is clicked in the chat interface. While the frontend seems to generate a new session ID, the execution environment might still be holding onto the previous session’s data, causing the nodes to continue using the old ID. This can happen in complex, stateful applications like n8n.
Manual Workflow Re-execution : After clearing the session and getting a new session ID in the chat, try manually re-executing the workflow from the n8n editor. This can sometimes force a complete reset of the workflow’s state.
Inspect the Browser’s Local Storage/Session Storage : It’s possible the old session ID is being cached in your browser.
Open your browser’s developer tools (usually by pressing F12).
Go to the “Application” tab.
Look for “Local Storage” and “Session Storage.”
See if you can find any keys related to your n8n session or chat and clear them out.
Check for Pinned Executions : In n8n, you can “pin” an execution, which can cause it to be reused. Make sure you don’t have a pinned execution that is being inadvertently used.
Update Your n8n Instance : You are on version 1.118.2. Newer versions might contain fixes for this kind of issue. Check the n8n release notes for any mention of bug fixes related to chat sessions and consider upgrading to a more recent stable version if possible.
Review the Postgres/Supabase Configuration : Since you are using an external database, double-check that the connection and configuration are correct. Ensure that there isn’t any configuration on the database side that might be preventing session data from being properly cleared or updated.
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!