Guides

Your agent remembers the old way to call the tool: what happens when an MCP server renames a field

An MCP server renames attendees to guests, the agent still sends attendees, the server says the event was created, and the agent tells you it is done. What a new paper measured across six models, what we saw in Claude Code, Codex and the official MCP SDKs, a script that catches the change before your agents do, and what to change on each side.

Published · updated

You ask an agent to schedule a Security Review with Paul and Maya. Last week it did the same thing for another meeting, so it knows the tool: calendar_create_event with title, start and attendees. It sends that again. The calendar server answers that the event was created, and the agent tells you: "The event 'Security Review' has been scheduled ... with Paul and Maya as attendees."

The event has no participants. Since last week, the server's field is called guests. The tool definition in front of the agent says guests. The agent wrote attendees anyway, the server ignored the field it no longer knows, and nobody got an invitation.

That sentence is a real model output, quoted in a paper submitted to arXiv on November 16, 2026: Experience Rot: Experienced Agents Fail Where Novices Succeed, by Xu, Yin, Zhang, Zhao and Liu (University of Chicago, eBay, University of Florida). It measures what happens when an agent has used a tool before and the tool then changes one detail. This guide gives their numbers, what we saw when we sent the old field through Claude Code, Codex and the two official MCP SDKs, a script that tells you when a server you depend on changes, and what to change on each side.

Card: Scheduled. No guests. Next to the title, the scene: the server renames attendees to guests; the agent sends attendees, like last week; the server ignores the field and says the event was created; the agent replies “has been scheduled ... with Paul and Maya”. On the left, a dark window from the December 3 lab, with no model called, showing what each client and SDK did with attendees: Claude Code 2.1.329 and codex-cli 0.156.1 pass it on without checking the schema; the TypeScript SDK with a zod shape and the Python SDK with typed arguments drop the field and return success; the TypeScript SDK with z.strictObject rejects it with Unrecognized key; the Python SDK with ToolError rejects it and names the new field. On the right, the Experience Rot paper (arXiv 2611.20922, six models): with complete documentation, 348 runs failed and 347 told the user the task was done. Success when the documentation does not have the answer: 63% with no experience, 100% with valid experience, 23% with out-of-date experience. Reading back what was stored caught the mistake in 94 of 97. In the bottom band, what to change: reject unknown fields; return what you stored; read back in the task; memory keeps decisions, not call shapes.

What the paper measured

The authors built three small services (a calendar, a task list, mail) in two versions that differ in one detail each: a renamed field (attendees to guests), a field replaced by another (end_time to duration_minutes), a renamed set of values (urgent...low to p0...p3), or the meaning of a number (is priority 1 the highest or the lowest; is weekday 0 Monday or Sunday). An agent first does tasks on version A, which become its experience. Then it does one task on version B. Six models, 12,624 episodes.

No experienceExperience still validExperience out of date
Success, documentation does not have the answer63%100%23%
Success, complete documentation available88–100%100%26–49%

The 49% is the case of the opening: the tool definition in front of the agent lists the new field, and the agent writes the old one. Out-of-date experience made agents worse than agents with none.

Four more findings matter for anyone running agents with memory:

  • The failure is reported as success. With complete documentation, 347 of 348 failed runs told the user the task was done. The services accepted the old call without an error, the same way many real ones do.
  • Experience stops the checking. Agents with experience looked something up before their first write in 6% of runs or less. The earlier call alone is enough: in 135 of 144 earlier tasks with a renamed field or a changed structure the agent never looked anything up, and the first write on the new version still repeated the old field in 61% of those runs. Runs that wrote the old field and then read back what was stored almost always caught it: 94 of 97.
  • Memory files carry the old shape. Experience kept in the conversation cost the most (0.53 in success rate), but notes cost too (0.20 to 0.30): 60–73% of the agents' memory files and 92% of their skill notes recorded the old field or value. The content was right in 95–100% of runs (the right people, the right time). What was wrong was how to call the tool.
  • Where you put the fix decides whether it works. "Check the documentation before writing" in the system prompt gave 29% (agents followed it in earlier tasks, 98%, and not in the final one, 4%). The same line in the task message gave 99%. "Check the result after writing" in the system prompt gave 91%, at 6.5 model calls per task against 2.9 with valid experience. A write that returns the stored object gave 79%, against 45% in its own baseline run. A version number and an update notice gave 50%.

The setup is synthetic: small services, one change at a time and a minimal agent loop. The paper says so in its limitations. It also cites a real one: in Todoist's own APIs, the sync API treats priority 4 as the highest and another endpoint treats 1 as the highest, and two community MCP servers for Todoist went opposite ways.

What we saw in Claude Code, Codex and the SDKs

The paper's agents use a minimal loop. We wanted to know what the tools our readers run do with the same mistake. On December 3, 2026, on one Linux machine, with Claude Code 2.1.329 and codex-cli 0.156.1, we ran a calendar MCP server over streamable HTTP with the paper's change: version A has attendees, version B has guests. The server ignores fields it does not know and always answers {"accepted": true}, which is what the paper's services did.

No model was called. Each tool pointed at a local stand-in for its API on 127.0.0.1, which answers with a scripted sequence of tool calls and records every request, so we see the exact tool definitions and results the model would get. Each case is one headless run, claude -p or codex exec.

CaseClaude CodeCodex
Server is on B, the model sends attendeesSent to the server as is. Event stored with no participants, result "accepted"Same
Same, with additionalProperties: false in the tool's schemaSame: the client did not check the arguments against the schemaSame
The write returns the stored eventThe model sees "participants": [] in the resultSame
A follow-up calendar_get_event after the writeShows "participants": []Same
Server switches from A to B mid-session, no notificationThe model keeps getting the A definitionSame
Server switches and sends notifications/tools/list_changedClaude Code fetched tools/list again within about 20 ms, but the next requests in the same run still carried the A definition of calendar_create_eventNo new tools/list request; A definition for the rest of the run
Same, with a second prompt 6 seconds later in the same process, and a new tool added in BThe new tool calendar_delete_event appeared; calendar_create_event kept its A definitionNot run

Claude Code's documentation says that in -p mode and the Agent SDK it "refreshes only the tool list" on a list_changed notification (as opposed to prompts and resources), and that an interactive session fetches the updated list. In our headless runs the refresh added the new tool but did not replace the definition of a tool that kept its name. We did not test an interactive session.

By default Claude Code loads MCP tool definitions on demand (tool search): the model starts with the tool names and pulls a definition in with ToolSearch when it needs one. We repeated the Claude Code cases over stdio with tool search on and off (ENABLE_TOOL_SEARCH=false) and got the same results: attendees reached a server whose schema said additionalProperties: false, and after list_changed a new search brought in calendar_delete_event while calendar_create_event kept its A definition.

Then the server side. We wrote the version-B tool with each official SDK the way their examples do and called it with attendees:

ServerWhat the handler receivedWhat the client got
TypeScript SDK 1.32.2, inputSchema as a zod shapetitle and start; attendees was droppedsuccess
TypeScript SDK 1.32.2, inputSchema: z.strictObject({...})nothing, the handler did not runisError: true, "Invalid arguments for tool calendar_create_event: Unrecognized key: "attendees""
Python SDK mcp 2.3.0, MCPServer with typed function argumentsguests=None; attendees was droppedsuccess
Python SDK mcp 2.3.0, attendees kept as a parameter that raises ValueErrorthe handler ran and raisedisError: true, "Error executing tool calendar_create_event", no reason
Same, raising ToolError from mcp.server.mcpserver.exceptionsthe handler ran and raisedisError: true, with the message: "attendees was renamed to guests in 2.0.0; send the same list as guests"

So with the default code from either SDK, the old field disappears without a trace and the call succeeds. In TypeScript one word changes that. In the Python SDK we did not find a switch that rejects unknown arguments for a plain function tool, but keeping the old name as a parameter that raises ToolError works, and the exception class matters: a plain ValueError reached the client as "Error executing tool" with the reason left out.

Five things to take from this

1. Nothing between the model and your server checks the call. Neither client validated arguments against the schema it had just shown the model, even a schema that says additionalProperties: false. If the server does not reject the old field, nobody does.

2. A silent success is the worst result. The model believes the result, and the paper shows it reports the task as done almost every time. An error with the field's name in it ("Unrecognized key: attendees") is the most useful thing a server can return after a change.

3. A schema change mid-session does not reach the model in these two clients. The notification exists and Claude Code acts on it, but in our runs the changed definition never got to the model in the same process. Plan for a restart: an agent session that was open during a server deploy is talking to the old version of the tool.

4. Memory files are where the old shape lives longest. The conversation ends; CLAUDE.md, AGENTS.md, skill notes and memory servers do not. The paper found the old field in most of them. Notes that say what to do ("invite Paul and Maya; security reviews are 45 minutes") survive a rename. Notes that say how to call a tool ("pass attendees") are the ones that rot.

5. The fixes that work sit next to the request. An instruction in the task message beat the same instruction in the system prompt by 70 points, but only when the documentation had the answer. A read-back after the write caught 94 of 97 failures, and as an instruction it held up with incomplete documentation too, at more than twice the model calls.

Notice the change before your agents do

This script takes a snapshot of a server's tools/list (tool names, fields, types, required fields, allowed values), compares it with the last one you saved and prints what changed. With --grep it also searches your memory files for the names that were removed. Standard library only, HTTP or stdio. Read it before you run it, because it gets your headers: mcp-tool-drift.py.

curl -fsSLO https://docs.valorbrain.com.br/guides/mcp-tool-drift.py

# first run saves the snapshot
python3 mcp-tool-drift.py --url https://calendar.example.com/mcp \
  --header "Authorization: Bearer $CAL_TOKEN" --snapshot snapshots/calendar.json

# stdio server
python3 mcp-tool-drift.py --snapshot snapshots/todo.json -- npx -y some-todo-mcp-server

# later runs: compare, and look for removed names in what your agents read
python3 mcp-tool-drift.py --url https://calendar.example.com/mcp \
  --header "Authorization: Bearer $CAL_TOKEN" --snapshot snapshots/calendar.json \
  --grep CLAUDE.md --grep AGENTS.md --grep .claude/skills

Against our lab server, after it moved from version A to B:

+ tool added: calendar_delete_event
- calendar_create_event: field removed: attendees
+ calendar_create_event: field added: guests
~ server: {'name': 'calendar-lab', 'version': '1.0.0'} -> {'name': 'calendar-lab', 'version': '2.0.0'}

memory still mentions removed names ['attendees']: 1 line(s)
CLAUDE.md:2: To add people to an event, pass attendees: ["a@x.com"].

It exits with 1 when something changed, 0 when nothing did, 2 on an error, so it fits a CI job or a cron that runs before your scheduled agents. Commit the snapshots next to the agent config and a change shows up in review as a diff. It sees only what the schema says: a number that changes meaning (priority 1 becoming the lowest) with the same field and type is invisible to it, as it is to the model. For those, read the changelog.

What to change

If you write MCP servers: reject what you do not know. In the TypeScript SDK, z.strictObject instead of a plain shape. In the Python SDK, keep the old name as a parameter that raises ToolError with the new name in the message (a plain ValueError loses the message on the way to the model). Keep the old name working for a while if you can, and when you drop it, return an error that names the new field: "attendees was renamed to guests".

Return what you stored. A write that echoes the stored object puts "participants": [] in front of the model. In the paper that alone took success from 45% to 79%.

Change meanings with new names. If priority 1 becomes the lowest, a new field or new values (p0...p3) fail loudly; the same field with the same type and a flipped meaning fails silently in every client and every script.

If you run agents: put the check in the task. For scheduled and headless jobs, end the prompt with "read back what you wrote and confirm it matches the request". In the paper it was the measure that still worked when the documentation lacked the answer (69%, against 25% for "read the documentation first" in the task message), and it cost more than twice the model calls (10.6 per task against 3.1). When the documentation does have the answer, "read the documentation before writing" in the task message reached 99% at 3.7 calls.

Restart sessions after a server deploy. Neither client in our runs delivered the changed definition to the model mid-process.

Keep decisions in memory, not call shapes. Write "the security review needs Paul and Maya" and let the agent read the tool definition for how. When you must record a calling convention, record it with a date, and run the drift script against the files that hold it.

Where ValorBrain fits

ValorBrain is a memory server for teams of agents, reached over MCP from Claude Code, Codex, Cursor and other clients. It does not watch your other MCP servers and does not know when a calendar or ticket server renames a field. That is the script's job.

What it does is keep each fact under a key with the date it became true, so a team's knowledge about a tool can be replaced instead of piling up next to the old version. When the drift script reports a change, one call records it:

{
  "tool": "upsert_keyed_fact",
  "arguments": {
    "fact_key": "tools.calendar.create_event.participants_field",
    "fact_value": "guests (renamed from attendees in calendar server 2.0.0; old name is ignored without error)",
    "as_of": "2026-12-03",
    "evidence": "mcp-tool-drift.py against calendar.example.com, 2026-12-03 09:00",
    "authority": "agent"
  }
}

The next agent that works with the calendar, on any machine, can find the current value under that key with a memory search or in the context that the hook installed by connect adds to a prompt about it, and keyed_facts_as_of still answers what was true before the change. A note in one repository's CLAUDE.md saying attendees is still there until someone edits it; the drift script's --grep tells you where.

Create a workspace from the terminal (this also works from inside an agent session):

npx -y @valorbrain/cli@latest init --agent --ref docs-agent-remembers-old-tool-call-mcp-schema-change --agent-caller claude-code --json

Or connect an existing workspace to your tools:

npx -y @valorbrain/connect@latest --token <vbm_…> --harness <claude-code|codex|cursor>

Plans are on the pricing page.

What ValorBrain does not do

  • It does not check calls to other servers. An agent can still send attendees to your calendar. Only the calendar server can refuse it.
  • It does not know a schema changed. Someone, or the drift script in a job, has to notice and write the new fact.
  • It does not make the agent read back. The line in the task message does that.

What we ran and what we did not

Fifteen headless runs (six cases in each client, plus three with two prompts in one Claude Code process), four more Claude Code runs over stdio with tool search on and off, and four server variants built with the official SDKs, on one Linux machine, with one lab server and local stand-ins for both APIs. No model call ran: our lab shows what reaches the model and the server, not what a model decides, and the success rates in this guide are the paper's, not ours. We did not test interactive sessions, Cursor, the Codex IDE extension, stdio transport in Codex, or servers on the 2026-07-28 protocol revision over a held-open notification stream. The paper's numbers come from six models it names (none of them Claude or GPT), synthetic services and one change per task.

Checklist

  • The servers you write reject unknown arguments with an error that names the field (TypeScript: z.strictObject; Python: the old name as a parameter that raises ToolError).
  • Writes return the stored object.
  • A changed meaning gets a new field or new values, not the same name.
  • A drift check runs on each server your agents depend on, with snapshots in the repository and --grep over your memory and instruction files.
  • Scheduled and headless prompts end with a read-back instruction.
  • Agent sessions are restarted after a server they use is deployed.
  • Memory notes say what the team decided, not how to call a tool; the ones that must say how carry a date.

Sources, read on December 3, 2026: Xu, Yin, Zhang, Zhao and Liu, Experience Rot: Experienced Agents Fail Where Novices Succeed (arXiv 2611.20922, submitted November 16, 2026, CC BY 4.0); Claude Code, Connect Claude Code to tools via MCP (Dynamic tool updates).

Next: When the MCP server is slow or fails mid-run for what headless runs do with errors, MCP tool results past 12 KB for the other thing the model gets that you did not expect, and Memory poisoning in shared agent memory for wrong facts that spread from one agent to the rest.

On this page