Mankiw often likes to tout the view that there is vast agreement in the economics profession over most of the major economic issues. In chapter 2 of his textbook, for example, he argues that while most economists differ on normative claims in economics (i.e., what ought to happen), there is widespread agreement about its positive claims (i.e., what actually happens). He often cites various polls of economists in support of his argument. His most recent cite is here. Another one here. Another one here.... It's almost as if he's not only trying to convince the public that economists largely agree on everything; he's trying to convince himself.
There are, however, a few problems with how his argument is made.
1. It's easy, though misleading, to cite sentence-long themes framed in a specific way and obtain consensus - it's much harder to dig into the details and find the same level of agreement. For example, the statement "If the federal budget is to be balanced, it should be done over the business cycle rather than yearly" might get 85% support among polled economists, but one wonders whether, if the question were asked "how" or via "what mechanism" etc., the agreement would be drastically reduced. This piece by Arindrajit Dube leads us to reflect on the idea that if the survey questions were framed differently or according to greater detail, they might reflect a growing consensus within economics that minimum wages do not necessarily have a significantly negative impact on employment. Other examples abound.
2. It's easy to get consensus if you only ask people who agree with you. I'm not suggesting that no members of the AEA or other academic economists polled have any heterodox inclinations (for example John Kenneth Galbraith was actually president of the AEA in 1972), but when the vast majority of economics departments and its institutions are run by and for mainstream economics, and when heterodox economists are so marginalized from the profession that they may not even be a part of mainstream professional institutions, you are bound to get the mainstream response. All you've really proven is that on some things there exists agreement among mainstream academic economists only. Additionally, if you only ask American economists, the skew is even greater because the United States has some of the least academic support for heterodox thought. A good example of this fact is the story of how a whole heterodox department is forced to close its doors. Expand this to business economists and financial economics experts who may not call themselves 'academic economists' but who, nevertheless, are prominently featured in policy circles and mainstream media outlets, and the skew could get even wider.
3. Perhaps the most important point is that agreement does not make you right. When groupthink is set as a priority above seeking the truth, that in and of itself suggests there is a fundamental problem within the economic profession. And that, at the end of the day, is the direction Mankiw would have mainstream economics continue to travel - a conglomeration of brainwashed groupthinkers who close their eyes to any alternative dialog that might challenge their worldview.