Stale MCP Tool Schema After Server Restart

Open 💬 1 comment Opened Apr 23, 2026 by abirmingham

What version of Codex CLI is running?

0.122.0

What subscription do you have?

Business

Which model were you using?

gpt-5.4 high

What platform is your computer?

Linux 5.4.0-216-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

What issue are you seeing?

Codex appears to keep a stale MCP tool schema in-session, even when the server emits notifications/tools/list_changed.

What steps can reproduce the bug?

  1. Start Codex with an MCP server exposing:
  • tool: count_detections
  • required input: duration
  1. Call it successfully: {"duration":"1h"}
  2. Change the server so the same tool name now requires:
  • lookback
  • not duration
  1. Rebuild and restart the MCP server.
  2. Server replays initialization and emits notifications/tools/list_changed.
  3. In the same Codex session, call the tool again.

Codex still uses the old schema and the call fails with:
Mcp error: -32602: invalid params: validating "arguments": validating root: unexpected additional properties ["duration"]

What is the expected behavior?

After notifications/tools/list_changed, Codex should refresh the tool definition and use the updated schema in the same session.

Additional information

Control

A fresh MCP client connected to the same restarted server immediately sees the new schema and can call the tool correctly, so this looks like a Codex-side stale cache/binding issue rather than an MCP server restart issue.

Current workaround

  • restart Codex after breaking MCP schema changes
  • or version tool names / temporarily accept both old and new params

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗