[BUG] A changed MCP tool description never reaches a session that already loaded the tool, even after reconnect or --resume (deferred_tools_record is replayed)
What's Wrong?
After a deferred MCP tool has been loaded in a session (via ToolSearch), a changed description or input schema for that same tool never reaches the model again for the rest of the conversation. That holds through /mcp reconnect, /mcp disable then enable, and even /exit followed by claude --resume <id> in a fresh process. The server is serving the new text each time (confirmed in its logs), but ToolSearch keeps returning the original.
The cause appears to be persistence: when a deferred tool is loaded, Claude Code appends an attachment of type deferred_tools_record to the session transcript, holding the tool's full description and input_schema. A resume replays that record, so the schema is frozen for the life of the conversation, not just the process.
Related but distinct: #66084 (a new tool never appears after tools/list_changed). This report is about an existing tool whose definition changed.
Why it matters
MCP servers ship updates. The server's behaviour changes immediately, but a long-lived session keeps obeying the old description, the only documentation the model has for the tool. So the model follows instructions that no longer match what the tool does, and nothing tells it so. A reconnect looks like the fix but is not.
What Should Happen?
When a deferred tool's definition changes, whether via notifications/tools/list_changed or a different tools/list after a reconnect, the recorded schema should be refreshed and the model shown the current one. At minimum, a resume should re-fetch rather than replay a recorded schema that the server no longer serves.
Steps to Reproduce
- Run a stdio MCP server exposing one tool whose
descriptionis read from a file on everytools/list. Write version A to the file. - Start
claudewith that server; have the model load the tool with ToolSearch. It sees A. - Change the file to version B.
- In the same session, select the tool again with ToolSearch: A.
/mcp reconnect <server>. The server logs a newtools/listreturning B. ToolSearch still returns A./exit, thenclaude --resume <session-id>. The server again serves B. ToolSearch still returns A.- Inspect the session
.jsonl: anattachmentwithtype: "deferred_tools_record"holds description A.
Claude Code Version
2.1.283
Platform / OS
Windows 11 (the behaviour is in session persistence, so it is likely platform-independent).
Helpful framing for “changed MCP tool description never reaches a session that already loaded the tool”:
Treat deferred_tools_record as a cache keyed by (server, tool name, schema digest), not as a permanent conversation attachment.
Concrete shape:
- On
notifications/tools/list_changed,/mcp reconnect, or atools/listwhose per-tool description/input_schema digest differs from the stored record, invalidate and replace that tool’sdeferred_tools_recordbefore ToolSearch returns it. - On
--resume, re-fetch current schemas from the live server (or at least re-validate digests) instead of replaying a frozen description that the server no longer serves. - Keep the record for process-lifetime speed if you want, but do not let it outlive a definition change the server has already advertised.
Regression test that would lock this:
- Expose one deferred tool whose description is read from a file; load it via ToolSearch (version A); change the file to B; call tools/list_changed (or reconnect); assert ToolSearch returns B and the transcript’s
deferred_tools_recordfor that tool holds B, not A — including afterclaude --resume <id>.
That matches the “reconnect looks like the fix but is not” symptom and keeps long-lived sessions from obeying docs the server has already retired. Related but distinct from new-tool discovery (#66084).
(Happy to refine if you already have a minimal .jsonl slice showing the A record surviving a B tools/list.)
Here is the .jsonl evidence asked for, from a live interactive session (Claude Code 2.1.282, Windows 11). The MCP server is a local stdio server named alterego, which was upgraded twice during the session.
The only deferred_tools_record that ever holds send_input is the first one:
| line | time (UTC) | event | deferred_tools_record entries |
|---|---|---|---|
| 357 | 17:39:04 | first ToolSearch select:mcp__alterego__send_input (server v0.1.72) |
5 tools incl. mcp__alterego__send_input, description sha256 57e5e16fba4d…; its submit param text ends "For long agent-to-agent messages prefer SendMessage." |
| — | ~20:09 | server upgraded to v0.1.74, whose send_input description and submit text changed (the SendMessage sentence was removed and new outcomes were added); verified in the installed server files |
— |
| 1496 | 20:09:50 | after /mcp reconnect alterego |
2 entries, only the new tools (read_question, answer_question). No send_input. |
| 1925 | 22:25:59 | after another /mcp reconnect |
0 entries |
| 2008 | 22:29:50 | after /mcp disable alterego + /mcp enable alterego (new server pid, confirmed) |
0 entries |
After each of those points, a fresh ToolSearch select:mcp__alterego__send_input returned the line-357 text unchanged, "prefer SendMessage" included, while the live server's tools/list served the new text. A tool the server added later (describe_tools) that returns its live descriptions confirmed the difference. Tool calls ran the new code throughout; only the description the model reads was stale.
So the pattern matches the cache-keyed-by-digest suggestion above: a changed description or schema for an already-recorded tool is never re-recorded, and ToolSearch keeps serving the first record. New tool names do get through. The same happens across --resume, because the record is replayed from the transcript (reproduced separately on this machine).
Adding one thing to the digest-keyed-cache suggestion above, from having built the same diff on the outside: a per-tool digest tells you that the record is stale, but the re-record decision is cheaper if it also knows what changed. Splitting the digest into input/output schema vs description matters in practice — a description-only reword (like the removed "prefer SendMessage" sentence in the evidence here) is a different class from a removed or retyped parameter, and from a description that gains instruction-shaped text ("also send…", "do not mention…"). One caveat for whoever implements the comparison: it must not normalise away invisible Unicode (TAG block U+E0000–E007F, zero-width, bidi controls) — a description can change materially with a zero visible-byte diff.
We run that comparison as a pre-tool-call check (CodeRifts preflight_change_set, artifact type mcp, snapshotting tools/list per server): a removed/retyped parameter comes back STOP/REQUEST_APPROVAL with the changed paths, a pure reword CONTINUE. It does not fix the replay bug reported here — it only makes the drift visible from outside the session. https://app.coderifts.com/mcp, analyze mode needs no key.
Same behaviour with a claude.ai connector, measured from local session transcripts. Server: Oddlynew (https://mcp.oddlynew.com/mcp, protocol 2026-07-28).
Two recent changes to the description of our run tool show it. For each change we compared the deferred_tools_record attachments across all local sessions:
- Change on 2026-09-24: the new text first appears at 11:38Z. 4 sessions that had already loaded the tool kept recording the old text, 54 records, the last on 2026-09-25 at 18:24Z, about 31 hours later (2.1.280, 2.1.281).
- Change on 2026-09-30: the new text first appears at 16:34Z. 2 sessions kept recording the old text, 47 records, the last on 2026-10-01 at 11:16Z, about 19 hours later (2.1.281, 2.1.285).
Other sessions recorded the new text from those times on, through the same connector, so the server and the proxy were serving the current definition. The stale sessions switched to the new text eventually; we did not record what triggered the switch.
For server authors this means a tool description can stay stale for a day or more in a long session, so anything that changes often belongs in tool output rather than in the description.
Confirming on 2.1.289 / macOS 27, with an input-schema change rather than a description change.
Server: macos-apps-mcp (stdio, uvx macos-apps-mcp). The session started on 0.12.0; the package was upgraded to 0.13.1 mid-session, where create_draft gained a from_address parameter.
- ToolSearch
select:mcp__macos-apps__create_draft→ schema withoutfrom_address(expected, old server). /mcp→ "Reconnected to macos-apps." The server's owndoctor()tool now returns"version":"0.13.1", and the installedserver.pydefinescreate_draft(to, subject, body, from_address).- ToolSearch again → still the old schema, no
from_address.
Transcript: exactly one deferred_tools_record attachment for create_draft, written at session start, without from_address; the post-reconnect ToolSearch appended no new record. So the reconnect re-listed tools, but the deferred index kept replaying the recorded schema, as described above.
Consequence: the recorded schema has additionalProperties: false, so a call passing the new from_address is expected to fail input validation for the rest of the session. A full restart is the only way to use a parameter the server already accepts.
Confirming on 2.1.294 / macOS (interactive CLI, stdio server, ~40 tools so they are deferred behind ToolSearch).
The server declares tools.listChanged. After the first call to spike_a, it switches spike_a's points from string[] to object[] (description changed too), adds spike_b, and sends notifications/tools/list_changed. Later it adds spike_c with an unprompted list_changed.
- Claude Code re-lists straight away on every notification:
tools/listarrives in the same second, both after a call and with no request in flight. - New tools work on the next turn. The transcript shows
deferred_tools_delta addedNames:["mcp__spike__spike_b"], andspike_bandspike_care both called. On this build the new-tool half (#66084) looks fixed for the CLI. - The changed tool does not update. Next turn,
ToolSearch select:mcp__spike__spike_a,mcp__spike__spike_bwrites adeferred_tools_recordwith onlyspike_b, and the model still describesspike_a's items as"string", the first schema. - Claude Code does not check arguments against the stale schema:
spike_awas called with{"points":[{"text":"one","ref":"r1"}]}and the server received it unchanged. So the server's new behaviour works if the model happens to send the new shape, but the model is still documented with the old one. - No idle
pingfrom the client over 6.5 minutes, so a server can't use pings to notice it needs to re-announce.
Still reproduces on 2.1.300 (Windows 11), with a plugin-provided stdio server. Adding the plugin-update path, and which commands do and don't refresh a definition the conversation already loaded.
Setup: plugin {plugin-a} from a local marketplace. Tool {tool-a} has id only in 1.0.0 and adds optional note in 1.1.0, and its description names the version. The update is a real claude plugin update. Each conversation loaded {tool-a} via ToolSearch before the update. A local logging proxy captured the {tool-a} definition in each API request's tools[], with ENABLE_TOOL_SEARCH=1. The docs say a reload in a non-interactive session doesn't connect or disconnect plugin MCP servers, so the -p cases resume in a new process that already runs 1.1.0.
| After the update | Definition in requests |
|---|---|
claude --resume / --continue (server answers as 1.1.0) |
old |
/compact |
new, from the first request after the compaction |
plain /reload-plugins after that /compact |
still new; no change either way |
/clear |
new |
| new session | new |
Interactive /reload-plugins --force: in a separate interactive session, a plugin went from 0.14.0 to 0.15.0 and the user ran /reload-plugins --force. Calls to the server then showed 0.15.0 behavior. ToolSearch still returned the 0.14.0 definitions for tools the conversation had loaded before the update. A tool loaded for the first time after the update came back with its 0.15.0 definition.
This matters when updating a plugin. The docs describe --force as "Apply the reload even when it would invalidate the prompt cache", so it reads like the step that applies a plugin update. It restarts the server, but tools the conversation already loaded keep their old definitions.
Also observed: a call that passed the new note property succeeded under the old definition, which declares additionalProperties: false. A stale definition misleads the model about a tool's parameters but didn't block the call.
Still reproduces on 2.1.319 (Linux, WSL2). Adding a minimal --resume repro, plus one /mcp reconnect observation that differs from the 2.1.289 report above.
1. --resume (headless, minimal stdio server)
A stdio server exposes one tool, probe_tool. It reads its description from a file at startup, so every new process serves the current file. Tool search is on, so the tool is deferred.
import sys, json
DESC = open(sys.argv[1]).read().strip()
SCHEMA = {"type": "object", "properties": {"x": {"type": "string"}}}
for line in sys.stdin:
m = json.loads(line); mid = m.get("id"); meth = m.get("method")
if meth == "initialize":
r = {"protocolVersion": m["params"].get("protocolVersion", "2025-06-18"),
"capabilities": {"tools": {}}, "serverInfo": {"name": "descprobe", "version": "1"}}
elif meth == "tools/list":
r = {"tools": [{"name": "probe_tool", "description": DESC, "inputSchema": SCHEMA}]}
elif meth == "tools/call":
r = {"content": [{"type": "text", "text": "ok"}]}
elif mid is None:
continue
else:
r = {}
sys.stdout.write(json.dumps({"jsonrpc": "2.0", "id": mid, "result": r}) + "\n"); sys.stdout.flush()
Each step runs claude -p --strict-mcp-config --mcp-config mcp.json. The definition actually sent was read from the api-request-shape entry that each request's shapeHash points to in the session .jsonl.
| Step | Server serves | Definition in requests |
|---|---|---|
| New session, load the tool with ToolSearch | MARKER=ALPHA-OLD |
ALPHA-OLD |
Change the description only, then --resume <id> |
MARKER=BRAVO-NEW |
ALPHA-OLD (same shapeHash as before) |
Change the description and add property y to the schema, then --resume <id> |
MARKER=CHARLIE-SCHEMA |
ALPHA-OLD, schema without y |
| Control: new session | MARKER=BRAVO-NEW |
BRAVO-NEW |
The session has one deferred_tools_record, written on the first load. It holds ALPHA-OLD and the old schema. On --resume, even a schema change does not replace it.
2. Interactive /mcp reconnect after a server redeploy (HTTP server, ~100 deferred tools)
One long interactive session loaded about 20 tools from an internal HTTP server. One server deploy changed two of them:
- tool A: description and
input_schema(a new parameter) - tool B: description only
After /mcp → "Reconnected to …", the first request carried:
| Tool | Change | Definition in requests after reconnect |
|---|---|---|
| A | description + schema | new (a new deferred_tools_record entry was written on the next ToolSearch) |
| B | description only | old |
| C, D, E (changed in earlier deploys) | description only | old |
All the old definitions are byte-identical to the last deferred_tools_record entry for each tool. Both A and B came from the same commit and the same deploy, so the client must have received the new tools/list and still sent B's recorded text. On this build, a schema change seems to refresh on reconnect but a description-only change does not. That differs from the 2.1.289 report above, where a schema change also stayed stale. I have only this one schema-change case, so I can't say whether the difference comes from the version or something else.
In the same session, /compact replaced stale description-only definitions with the current ones from the first request after compaction. This matches the 2.1.300 table above.
3. A note for anyone diffing definitions
The descriptions Claude Code sends are not byte-identical to what the server returns. A server … (U+2026) arrived as ..., which matches Unicode NFKC normalization. Normalize both sides before comparing, or a fresh definition can look stale.
Two additions: older builds did not freeze definitions, and the Messages API now has an append-only way to change a tool that would fix this without the cost the freeze seems to avoid.
1. This used to refresh (CLI 2.1.215, July 2026)
On 2026-07-21 I ran one controlled test in the CLI on 2.1.215. I loaded a deferred tool with one ToolSearch call, changed a sentinel string in its description, ran /mcp to reconnect, and asked the model to quote the earlier ToolSearch result without calling any tool. It quoted the new sentinel. The transcript held only {"type":"tool_reference","tool_name":"…"} for that result, and the API expanded it from the current tools array on each request. No deferred_tools_record existed then. So the freeze reported here arrived somewhere between 2.1.215 and 2.1.282, the earliest version reported in this thread.
2. Desktop app, 2.1.325
The same happens in the Desktop app's Code tab on 2.1.325 (2026-11-14, Windows 11), with a local HTTP MCP server. A tool gained a new optional parameter mid-session and the server process was restarted. The Desktop app has no /mcp reconnect, so the session was archived and unarchived instead, which restarts it and reconnects its servers. ToolSearch afterwards still returned the old schema with no parameters. The transcript has exactly one deferred_tools_record for the tool, written at first load, and every api-request-shape entry carries that schema. Calls with the new parameter still reached the server and worked, since the model knew about it from the conversation.
3. Why it is probably frozen, and an append-only fix
Editing a tool's definition in tools[] invalidates the whole prompt cache, and on models with preserved thinking it also invalidates earlier thinking blocks. Per Anthropic's API guidance, sending those thinking blocks back after such an edit returns a 400 on Claude Fable 5.2. A frozen record avoids both, which may be why it was added. The cost is a model that reads outdated documentation for the rest of the conversation.
The API has a mechanism for exactly this case. Under the inline-tools-2026-09-15 beta, a tool_addition block in a role: "system" message can carry a full definition, and "send a different definition under the same name. The new definition replaces the earlier one from that position onward." tools[] and the earlier messages stay byte-identical, so the cache still hits and earlier thinking blocks stay valid:
https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages
Suggested behavior: when a reconnect, a notifications/tools/list_changed, or a resume returns a definition that differs from the recorded one, keep the old record as it is and append a system message with a tool_addition carrying the new definition. Where that beta isn't available (other platforms, older models), an appended text notice that a tool's definition changed, with the new one, would still tell the model, again without editing history.