In a jovial ceremony last week at Gracie Mansion, Mayor Bill de Blasio announced that his vision for a muscular liberal government was going national: More than 30 mayors had pledged to adopt the signature de Blasio agenda of creating what he calls more affordable, inclusive and equitable cities.

Yet at home, Mr. de Blasio, who swept into office on the promise that New York City could be governed from the left, is discovering that liberalism has its limits.

The mayor who shot to fame denouncing stop-and-frisk tactics and luxury condominiums is now defending hard-nosed policing and cutting deals with developers, bowing to the realities of leading an unruly city but also angering an activist left that propelled his rise to the Democratic elite.

Impatience with the mayor is now spilling into outcry. On Wednesday, housing advocates will march in Harlem to highlight what they say is a too-weak effort by City Hall to build affordable homes. And the Rev. Al Sharpton is planning a march on Saturday to call for an end to aggressive policing in the wake of a black Staten Island man’s death after being placed in a chokehold during a routine arrest.