- Remove {:line, 1024} port option that was truncating long JSON responses
- Rewrite collect_response to handle binary data instead of line-based data
- Add extract_json_messages function to properly parse complete JSON from mixed stdout
- Filter out log messages while preserving complete JSON responses
- Add timeouts to all GenServer calls to prevent blocking
- This fixes the 'unexpected end of input at position 1024' JSON decode errors
- Replace hardcoded tool lists with dynamic discovery via MCP tools/list
- Move MCPServerManager to application supervision tree for resource sharing
- Eliminate duplicate MCP server instances (one shared instance per server type)
- Add automatic tool refresh when servers restart
- Implement conditional VS Code tool loading based on module availability
- Add comprehensive test suite for dynamic discovery
- Update documentation with architecture improvements
Benefits:
- Full MCP protocol compliance
- Massive resource savings (shared servers vs per-agent instances)
- Zero maintenance overhead for tool list synchronization
- Automatic adaptation to server changes
- Improved reliability and performance
Closes: Dynamic tool discovery implementation
Fixes: Multiple MCP server instance resource waste
- Fixed Task.new/3 to handle both maps and keyword lists
- Added robust inbox existence checking in find_available_agent
- Ensure inbox creation during agent registration and task assignment
- Add helper function ensure_inbox_exists to avoid crashes