Feature: allow deferred tools to be unloaded/de-expanded after use
Resolved 💬 3 comments Opened Feb 20, 2026 by DanielPBak Closed Feb 24, 2026
Problem
Once a deferred tool is loaded via ToolSearch, it remains in the active tool list for the rest of the session. There is no way to unload it. Over the course of a long conversation, tools accumulate -- each ToolSearch call permanently adds to the context footprint even if the tool is only needed once.
This is especially painful with large MCP servers. If you expand 10-20 tools throughout a session, their full JSON schemas persist in every subsequent turn, consuming context that could be used for actual work.
Proposed solution
Allow expanded deferred tools to be collapsed back to their deferred state after use. This could be:
- Automatic: Tools that haven't been called in N turns are automatically de-expanded back to deferred entries
- Explicit: A companion to
ToolSearch(e.g.,ToolReleaseorToolSearchwith a release mode) that lets the model unload tools it no longer needs - LRU-style: A configurable cap on the number of simultaneously expanded tools, with least-recently-used tools being de-expanded when the cap is hit
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗