Donald Trump visited Gracie Mansion on Monday for a closed-door meeting with New York Mayor Zohran Mamdani — the first presidential visit to the residence in 45 years, since Reagan met Ed Koch in 1981. The two emerged to a press conference that was conspicuously warm, with Trump saying he hoped Mamdani would be a 'great mayor' and calling the 34-year-old a leader with 'great potential.' The optics are jarring on paper. Trump has spent months branding Democrats as 'godless communists' ahead of the November midterms, and Mamdani is a card-carrying member of the Democratic Socialists of America, born in Uganda, and New York's first Muslim mayor. Yet the two have now met multiple times and each encounter follows the same script: public warmth, vague talk of shared interests, and minimal disclosure of disagreements. The meeting's substance, to the extent any was revealed, centered on affordable housing — specifically the Sunnyside Yard development in Queens — and immigration. Mamdani said he shared 'very strong opinions' about the Trump administration's stripping of protections for Haitian immigrants but offered no details on Trump's response. He also disclosed that he told Trump the press would always be welcome at Gracie Mansion, a pointed reference to Trump's decision to ban CNN, MS Now, and Politico from White House grounds. The transactional logic is straightforward. Mamdani needs federal cooperation — or at least non-hostility — to govern a city with massive infrastructure and housing needs. Trump needs to demonstrate he can work with anyone, neutralizing the 'divisive' label while simultaneously undermining Democratic messaging that he is an existential threat. Each man walked away with a usable photo op and no binding commitments. The day before the meeting, Mamdani had joined Mexico City Mayor Clara Brugada to meet with migrant delivery workers expressing fear over increased ICE arrests. Earlier this month, Mamdani helped initiate a 22-state lawsuit against the Trump administration's 'public charge' rule targeting immigrant communities. Whether either topic came up in the closed-door session is unknown. Trump's comment — 'I want what's good for New York. I want what's good for the country' — is boilerplate, but its deployment here is strategic. By treating Mamdani as a legitimate governing partner, Trump inoculates himself against charges of blanket anti-Muslim or anti-left hostility while losing nothing of substance. Mamdani, for his part, avoids the trap of performative resistance that plays well on social media but delivers nothing for constituents. The risk for both men is that their respective bases read the warmth as capitulation. Trump's midterm messaging depends on painting all Democrats as dangerous radicals; making an exception for New York's democratic socialist mayor complicates that narrative. Mamdani's progressive supporters may question why their mayor is providing Trump a friendly venue days after standing with ICE-targeted workers. For now, both are betting that transactional competence outweighs ideological purity.