FIDEL CASTRO has never been more isolated in the personal fiefdom he has made of Communist Cuba. He is losing his patrons inEastern Europe and, by degrees, in the Soviet Union as they open their societies, abandon the ideology to which he still clings and turn to ways and opportunities of the West. He has lost the company of dictators in the neighborhood (Nicaragua, Panama, Grenada) and beyond (Romania). Now he seems intent on losing as well the comforts he has enjoyed from some heretofore friendly Western countries. This is the result of the incidents he has provoked with the Havana embassies of, among others, Spain and Canada, Cuba's two leading sources of hard currency from tourism and economic aid.

The past year's experience in Eastern Europe has shown that a volatile mix is created when citizens in a Communist country, driven to desperation by life under socialism, seek asylum in foreign embassies. The taste of freedom they find there is exhilarating, and the drama of it is underlined by the international media. In the Cuban case, President Castro understood well from the Mariel incident of 1980 the potential for political explosion. Once asylum seekers entered embassy compounds, he was not prepared to let them emigrate, apparently fearing that would merely invite more Cubans to take the same route. Instead, he seems to have infiltrated police agents into the embassies to press freedom-seeking Cubans to return and to provoke the embassies. This ugly performance was bound to roil relations with friendly governments, but Mr. Castro evidently thought it worth the risk in order to maintain control.

Speaking on the holiday of Cuba's revolution last Thursday, Mr. Castro vowed to keep fighting to build socialism in Cuba -- even as the cause wavers and collapses elsewhere. But the odds are against success in this effort for a small lonely country isolated by police rule from most of its citizens and by erratic or hostile policy from almost every other country in the world. His retreat to a hedgehog pose is evidence that the clock is ticking on Communist Cuba.