Gemini CLI Fix: Embed Hash in Truncated MCP Tool Names to Avoid Collisions

chandlerm923 · ghdev · 2026-08-23

This PR resolves an issue in gemini-cli where truncated MCP tool names caused collisions. Previously, names exceeding API limits were shortened to the first and last 30 characters, causing distinct tools (e.g., create... vs delete...) to map to the same registry entry. The fix embeds an 8-character hash digest between the head and tail of the name. This ensures stability across restarts and processes while guaranteeing uniqueness within the 63-character limit.

Original post →

More from coding & agent

coding & agent channel →