Skip to content

CLI-41: Allow agents MCP management + HashPos Base64 + TUI reliability improvements#585

Merged
dwash96 merged 22 commits into
cecli-dev:v0.100.9from
szmania:cli-41-allow-agents-mcp-management
Jun 22, 2026
Merged

CLI-41: Allow agents MCP management + HashPos Base64 + TUI reliability improvements#585
dwash96 merged 22 commits into
cecli-dev:v0.100.9from
szmania:cli-41-allow-agents-mcp-management

Conversation

@szmania

@szmania szmania commented Jun 21, 2026

Copy link
Copy Markdown

Summary

This PR enables agents and sub-agents to manage MCP (Model Context Protocol) servers at runtime via new tools and commands (/load-mcp, /remove-mcp, /list-mcp), along with significant infrastructure improvements for event loop safety, HashPos encoding, and TUI reliability.

Key Changes

MCP Server Management (CLI-41)

  • New /list-mcp command and ListMcp tool: Lists all loaded and configured MCP servers
  • New load_mcp and remove_mcp tools: Allow agents to dynamically load/unload MCP servers at runtime
  • Server registration state machine: Per-coder include/exclude sets with hierarchical propagation across agent/sub-agent trees
  • Event loop affinity checks: McpServer and HttpBasedMcpServer now track which event loop created their connection and reconnect when the loop changes
  • ReloadProgramSignal: New signal type for full program reload after TUI exit

HashPos Encoding Upgrade (Base256 to Base64)

  • Migrated from 3-char Base256 to 4-char Base64 content IDs for improved reliability
  • Updated all regex patterns, normalization, and resolution logic
  • Updated prompt templates with new example IDs

TUI Improvements

  • Confirmation queue: Serialized confirmation dialogs prevent overlapping prompts
  • Path completion via FileSystemService: Uses trie/trigram indexes for faster filesystem completions
  • SwitchCoderSignal handling in worker exception handler
  • Version display in TUI banner

Tests

  • Comprehensive unit and integration tests for LoadMcpTool and RemoveMcpTool
  • Tests for agent and sub-agent MCP management scenarios

Your Name added 21 commits May 30, 2026 17:49
Co-authored-by: cecli (openai/code)
Co-authored-by: cecli (openai/code)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
@szmania

szmania commented Jun 21, 2026

Copy link
Copy Markdown
Author

@dwash96 this one is ready: #585

A real game changer now folks can put the lists of skills, mcp severs and tools that a agent should use in the agents.md files and the agents will automatically load and unload them

Co-authored-by: cecli (openai/gemini_cli/gemini-2.5-pro)
@dwash96 dwash96 merged commit 88eb1b7 into cecli-dev:v0.100.9 Jun 22, 2026
1 check passed
@dwash96 dwash96 mentioned this pull request Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants