
n8n AI Agent Memory Drops Tool Calls: Fixed in 2.49.0
If your n8n AI Agent calls a tool it already called on the previous message, you're probably on the stable 2.48.x line. Its AI Agent saves only the last round of tool calls to chat memory, and when it gets several items it can hand one item's tool results to another. n8n 2.49.0 and 3.3.0, both released this morning, fix it. I ran the same workflows on 2.48.4 and 2.49.0 with a logging stub in place of the model and then with a real one. Here's what the model actually received, and what that cost.
What Changed Between n8n 2.48.4 and 2.49.0?
Three AI Agent fixes landed in the 2.49.0 release, and the same three are in 3.3.0. All of them touch the version 3 agent (node versions 3 and 3.1, which is what you get when you drop a new AI Agent on the canvas today):
- #43536: save every tool-calling round of a turn to chat memory, not just the last one.
- #43559: keep the text the model wrote before its tool calls when the agent rebuilds history.
- #43890: keep tool-call history separate for each input item.
On Docker Hub, stable and latest still point at 2.48.4 today, and 2.49.0 is the beta/nexttag. On the 3.x line, 3.2.2 has none of these fixes. Here's the scorecard from my runs:
| Test | 2.48.4 | 2.49.0 |
|---|---|---|
| Tool calls visible to the model on turn 2 (stub) | 1 of 2 | 2 of 2 |
| Model text before each tool call kept in history (stub) | No | Yes |
| Turn 2 re-called lookup_order (real model, 5 sessions) | 5 / 5 | 0 / 5 |
| Model calls on turn 2 (per session) | 2 | 1 |
| Items 2 and 3 saw only their own tool history (stub) | No | Yes |
| 3-item runs that finished (real model) | 0 / 2 | 3 / 3 |
| Model calls / tool calls per 3-item run (real model) | 30 / 22 | 9 / 6 |
Why Does the n8n AI Agent Forget Its Tool Results?
Because on 2.48.4 it never wrote most of them down. The version 3 agent doesn't run tools inside the node. It asks the n8n engine to run the tool node, gets the result back and calls the model again. One message from the user can take several of these rounds. Memory gets written once, at the end of the turn, and the old code skipped the first rounds "to avoid duplicates". The PR that fixes it explains that the skipped rounds were never saved anywhere else, so every round but the last was lost.
To see it, I built the classic chained-tool case: an order support agent with Simple Memory and two Code Tools. lookup_order returns the delivery date, the carrier and a return ticket ID. check_refundneeds that ticket ID, so the model has to call them in two rounds. The model was a Python stub that speaks the Gemini API, plugged in through the Google Gemini credential's host field. It replies with scripted tool calls and logs every request, so I could see the exact history n8n sent.
Turn 1 asked whether the refund was approved. Turn 2 asked which carrier delivered the order:
// n8n 2.48.4: what the model received on turn 2
user "Is the refund for order A-100 approved?"
model functionCall check_refund("RT-5521")
user functionResponse "Refund for ticket RT-5521: approved, $84.00"
model "Yes, the refund for A-100 is approved: $84.00."
user "Which carrier delivered it?"
// lookup_order (carrier, date, ticket id) is gone// n8n 2.49.0: same workflow, same inputs
user "Is the refund for order A-100 approved?"
model "Checking the order first." + functionCall lookup_order("A-100")
user functionResponse "Order A-100: delivered Nov 12 by carrier Estafeta, ..."
model "Found ticket RT-5521, checking the refund." + functionCall check_refund("RT-5521")
user functionResponse "Refund for ticket RT-5521: approved, $84.00"
model "Yes, the refund for A-100 is approved: $84.00."
user "Which carrier delivered it?"On 2.48.4 the answer to the follow-up question wasn't in memory anymore.The carrier lived in the first tool result, and that round was dropped. You can also see the second fix: the text before each tool call ("Checking the order first.") is missing from the old history. The PR for that one says models then copy the synthetic history format into their replies to users, so if your agent ever answers with something like "Calling tools: ...", that's a likely source.
What Does the Lost Memory Cost With a Real Model?
A stub shows what the model receives. It doesn't show what a model does with a gap. So I swapped in a real Gemini 3.1 Flash Lite credential, temperature 0, and ran five two-turn sessions on each version with the same questions.
The answers were identical: every session on both versions said Estafeta, November 12. That's what makes this bug easy to miss. The difference was in the execution log. On 2.48.4, turn 2 called lookup_order again in all five sessions, which meant two model calls and one tool call per follow-up. On 2.49.0 the model answered from memory in one call with zero tools.
That repeat call is a bill and, sometimes, a side effect.A lookup is harmless. A tool that creates a ticket, sends an email or charges a card would run twice. If you've wondered why an agent re-does work, this is a likely cause, and it's the same family of problem as the duplicate runs in n8n duplicate executions and idempotency. A weaker model might also skip the tool and guess, which is worse. I didn't see that with Flash Lite, but the PR authors list "invented results" among the symptoms they saw.
Can the AI Agent Mix Up Data Between Items?
Yes, and this is the one I'd upgrade for today. When an AI Agent node gets several input items and each item calls tools in two or more rounds, 2.48.4 kept the tool history of the first item and gave it to all of them. I sent three items, one order each, through the same stub. Here's what each item's third model call contained:
// n8n 2.48.4, third model call for each item (after two tool rounds)
item "ITEM A-100" -> context has lookup_order("A-100"), check_refund("A-100")
item "ITEM B-200" -> context has lookup_order("A-100"), check_refund("B-200")
item "ITEM C-300" -> context has lookup_order("A-100"), check_refund("C-300")
// items 2 and 3 carry item 1's lookup and its result, and lost their own
// (the stub passes the order ID to both tools, so ignore the refund argument)Item B's context held item A's order lookup and its result, and B's own lookup was gone. Swap "order" for "customer" or "patient" and that's one record's data in another record's prompt, with no error anywhere. The fix in #43890 notes it also happens with the default batch size of 1, so turning batching off doesn't avoid it.
With the real model the run didn't produce wrong answers. It produced no answers. Gemini kept seeing a history that didn't match its own prompt, kept calling tools to fix it, and both 2.48.4 runs died with Max iterations (10) reached. The agent could not complete the task within the allowed number of iterations. That was 30 model calls and 22 tool calls for three orders. On 2.49.0 all three runs finished with 9 model calls, 6 tool calls and the right date and refund for each order.
So if you've been raising Max Iterations on a multi-item agent because it "needs more steps", check your version first. Tracing tool calls per item, as in my n8n AI Agent observability setup, makes this visible in minutes.
Is the Older AI Agent Version 2.2 Affected?
Not by these bugs, but it doesn't give you what you want either. I ran the same stub workflows on 2.48.4 with the agent set to version 2.2. Each item kept its own tool history, so no mixing. But the memory stored zero tool calls: turn 2 got the user message and the final answer from turn 1, and nothing in between. That's how the older agent always worked, so a follow-up about a tool result needs the tool again.
Version 3 on 2.49.0 is the first setup in my tests that remembered tool results across turns.If you held back on version 2.2 for stability, that's now a reason to move.
How Do You Check and Fix Your Workflows?
1. Find the exposed agents
You're affected if an AI Agent node at version 3 or 3.1 runs on 2.48.x (or 3.x before 3.3.0) and either has a memory sub-node and tools that chain, or receives more than one item and calls tools more than once per item. Going by the PR's explanation, a turn with only one round of tool calls (even several calls in parallel) lost nothing to the memory bug, because the last round was the only round. I only tested two sequential rounds.
2. Read the executions
Open a few past executions and count runs per tool node. Repeat calls to a tool whose result should already be in memory, or multi-item runs ending in the iteration limit, are the fingerprints.
3. Upgrade and rerun
Move to 2.49.0 if you're fine on the beta channel, or wait for it to become stable. On 3.x, go to 3.3.0. If you're still planning the jump to 3.x, the n8n 3 migration report is the place to start. After upgrading, rerun one real conversation and compare tool counts.
4. Re-check memory size
The fix means memory holds more. My two-round turn stored six messages instead of four, and every later turn sends them to the model. The Simple Memory docs describe the window as past interactions, so check that your Context Window Length still covers the turns you need, and watch input tokens for a day. The fix sits in the agent code that writes to any memory node. I only tested Simple Memory, but if you use Postgres or Redis memory (I compared them in Postgres vs Redis chat memory), expect more rows per session too.
I didn't test workarounds for 2.48.4, like splitting items into sub-workflow calls. With upgrades available the same day, I'd rather upgrade than trust a workaround I haven't measured.
n8n AI Agent Memory FAQ
Why does my n8n AI Agent call the same tool again on the next message?
On n8n 2.48.x and 3.x before 3.3.0, the AI Agent (node version 3 and 3.1) saves only the last tool-calling round of a turn to chat memory. Earlier rounds are dropped, so on the next message the model doesn't see those results and calls the tool again. In my test that happened in 5 of 5 sessions. n8n 2.49.0 and 3.3.0 save every round.
Can the n8n AI Agent mix up data between input items?
Yes, before 2.49.0 and 3.3.0. When several items each needed two or more tool rounds, items 2 and 3 got item 1's first tool call and result in their model context instead of their own. No error is shown unless the model gets confused and hits the iteration limit, which it did in 2 of 2 real-model runs.
Which n8n versions fix the AI Agent memory bug?
n8n 2.49.0 (released November 17, 2026 as the beta and next tag) and n8n 3.3.0 include all three fixes: PR #43536 (save every tool round to memory), PR #43559 (keep the model's text before tool calls) and PR #43890 (keep tool history separate per item). 2.48.4 and 3.2.2 don't.
Does AI Agent version 2.2 have the same bug?
Not the same one. In my test Agent 2.2 kept each item's tool history separate, but its memory stored only the user message and the final answer, with zero tool calls. So a follow-up question about a tool result also needs the tool again, by design.
Do I need to change my memory settings after upgrading?
Possibly. After the fix, a turn with two tool rounds stored six messages instead of four in my test. More history goes to the model on every later turn, so check your context window length and token costs after the upgrade.
How I Tested
November 17, 2026, on a Mac mini in Allen, TX. One fresh n8nio/n8n container per version (2.48.4, then 2.49.0), each with an empty database, workflows and credentials imported with the n8n CLI, and production webhooks driven by curl. The agent was the AI Agent node at version 3.1 with a system message, Simple Memory keyed on a session ID, and two Code Tools. The stub model was a local Python server answering the Gemini generateContentformat with scripted tool calls, and it logged the full request body each time. The real-model runs used Gemini 3.1 Flash Lite at temperature 0: five two-turn sessions per version and three-item batches (two on 2.48.4, three on 2.49.0). Tool and model call counts come from each execution's saved run data in the n8n database, not from the responses. The Agent 2.2 check used the stub on 2.48.4 only. Model cost for everything was a few cents.
If you're deciding whether a job belongs in an agent at all, my take on agent tools vs sub-workflows covers that.
Agent Doing the Same Work Twice?
I build and fix n8n AI agents that run in production every day. Send me the workflow and an execution that looked wrong, and I'll tell you whether it's your prompt, your memory or your n8n version.
Related Posts
n8n
n8n Structured Output Parser Not Working? 5 Real Causes
I fed the real n8n 2.46.6 parser 17 broken outputs and ran 220 Gemini calls through it. Truncation, a missing output wrapper behind a misleading 'empty response' error, Auto-Fix inventing data, and Retry On Fail that only checks item 0.
n8n
n8n Anthropic Prompt Caching: When the Toggle Pays Off
n8n 2.37 added Prompt Caching to the Anthropic Chat Model and 2.42 to the Anthropic node. It uses automatic caching, so agent tool loops get about 67% cheaper input while one-shot workflows pay 25% more for cache writes nobody reads. Where the toggle lives, why reads stay at 0, and the HTTP Request fix.
n8n
n8n SSRF Protection: What It Blocks and How to Allow It
I sent 15 URLs through n8n 2.47.7 and 3.2.2 with SSRF protection off and on. The block list caught DNS and IP-encoding tricks, 3.x now blocks Tailscale, AI nodes hide the SSRF error, and dropping the default keyword reopens localhost.