First, there are military coups organized by the most aggressive, reactionary sectors of the bourgeoisie against a bourgeois government which reflects – from the standpoint of the capitalist class – too much the pressure from the workers and the popular masses. By definition, such a government is not socialist, i.e. it is no authentic workers government. Usually we have in such cases rather a popular front government (i.e. a coalition of the reformist bureaucracy mass organizations of the working class and other oppressed classes with sectors, or maybe even only a “shadow” as Trotsky once famously formulated it, of the bourgeoisie) or a bourgeois government which rests on mass support amongst sectors of the oppressed.
However, despite their fundamental bourgeois class character, such governments, exactly because their power rests to an important degree on the popular support among the workers, the poor peasants, the urban poor or the lower middle layers, are forced to make various concessions to the expectations of their popular supporters. This will usually result in certain social reforms, state subsidy programs for the urban or rural poor, democratic reforms which limit to a certain degree the power of the reactionary repressive state apparatus, economic or political reforms which reduce the domination of foreign imperialist powers etc. Naturally, such governments do not endanger the capitalist system and are dangerous for the working class and the oppressed as they demobilize their struggle. Nevertheless they can provoke the aggression of the ruling class as such popular front governments can become a temporary obstacle for the capitalists’ ruthless offensive.
Let us give a few examples to illustrate this type of coup. To start with some historical examples we could refer to the failed coup of General Kornilov against the “popular front” government of Kerensky in August 1917 in Russia.  Or take the military coup against the peasant party’s government of Aleksandur Stamboliyski in Bulgaria in June 1923.  Another example is the coup of General Franco against the Spanish popular front government in July 1936.  More actual examples are the military coups in Brazil in April 1964 or in Chile in September 1973. 
Finally, to give examples from recent years, we refer to the bloody military coup of General Sisi against the Egyptian government of President Morsi on 3 July 2013 , the coup of the Thai army against the government of Prime Minister Yingluck Shinawatra in May 2014,  or the institutional coup against the government of Dilma Rousseff in Brazil in April 2016. 
All these governments had in common that, while having a bourgeois class character, they rested on mass support amongst the popular classes. As a result, the Morsi government – the first and only democratically elected government in the history of Egypt – put some limits to the total domination of the army command and lent some support to the Palestinian people fighting against the terrorist Apartheid regime of Israel. Similarly, the Rousseff government with its support amongst the organized sectors of the working class and the poor peasants (e.g. CUT, MST, MTST) was under some popular pressure to moderate the neoliberal attacks. And the government of Prime Minister Yingluck Shinawatra was hated by the bourgeoisie because it gave some subsidy programs to the poor peasants.
As the purpose of this essay is only to generalize the experience of different types of coups we refrain from dealing with these examples in detail and refer readers to the appropriate literature in the respectively footnotes.
To avoid any misunderstandings: all these governments never had a socialist character but were rather bourgeois in their class character. They were not willing to expropriate the capitalist class but only to implement some social and democratic reforms within the limits of capitalism. However, in a period of crisis and decay, the capitalist class can not afford even such reforms but must smash all obstacles which stand in their way to increase its share of the national wealth and to expand its political domination.
In such situations, the tactic of revolutionaries has always been to call for a united front against the immediate threat of the coup in order to defeat it. Such a united front orientation should focus on the workers organization but must also include other popular mass organizations of the poor peasants, the urban poor or the lower middle class which are ready to fight against the putschists. Of course revolutionaries would limit such a united front only to the practical struggle against the coup and for the defense of the democratic rights. At the same time, Marxists have to warn against any illusions against such popular front governments and must call for political independence of the working class.
Here is not the place to elaborate the approach of the Marxist classics on military coups in detail and we refer readers for this to other works of the RCIT.  To give a short summary we quote the position of the leadership of the Communist International which it unanimously took in face of the military coup in Bulgaria in June 1923. Grigory Zinoviev, the chairman of the Communist International, sharply criticized his Bulgarian comrades for their neutrality in this conflict and emphasized: “In the moment where the fascists where in struggle with the leaders of the Peasant Party, it was (and remains today) the task of the Communist Party to unite with all honest supporters of the Peasant Party to struggle against the Whites. Has Kerensky not been an enemy of the workers in September 1917? But nevertheless did the Bolsheviks march with Kerensky against Kornilov.” 
Leon Trotsky generalized such an approach in an essay written in 1937 on the Spanish Revolution: “Before 1934 we explained to the Stalinists tirelessly that even in the imperialist epoch democracy continued to be preferable to fascism; that is, in all cases where hostile clashes take place between them, the revolutionary proletariat is obliged to support democracy against fascism. However, we always added: We can and must defend bourgeois democracy not by bourgeois democratic means but by the methods of class struggle, which in turn pave the way for the replacement of bourgeois democracy by the dictatorship of the proletariat. This means in particular that in the process of defending bourgeois democracy, even with arms in hand, the party of the proletariat takes no responsibility for bourgeois democracy, does not enter its government, but maintains full freedom of criticism and of action in relation to all parties of the Popular Front, thus preparing the overthrow of bourgeois democracy at the next stage.” 
 There exists a vast amount of Marxist literature on the Kornilov coup. Trotsky dealt with this issue in his famous book on the Russian Revolution: Leon Trotsky: History of the Russian Revolution (1932), Haymarket Books, Chicago 2008, chapter 27-31, pp. 439-519. Another valuable book has been written by the Alexander Rabinowitch: The Bolsheviks Come to Power, New Left Books, London 1979, chapter 6-8, pp. 94-150. We have summarized our analysis in a chapter of a pamphlet published by our predecessor organization Workers Power: The Road to Red October: The Bolsheviks and Working Class Power (Chapter 6), https://www.thecommunists.net/theory/russian-revolution-1917/chapter-6/
 As the military coup in Bulgaria is much less known we list some works dealing with it. See e.g. Roumen Daskalov: Debating the Past - Modern Bulgarian History: From Stambolov to Zhivkov, Central European University Press, Budapest, 2011, chapter 1 and 2, pp. 7-143; Frederick B. Chary: The History of Bulgaria, Greenwood, Santa Barbara 2011, pp. 56-71; Joseph Rothschild: The Communist Party of Bulgaria. Origins and Development 1883-1936, New York 1959, pp. 112-116; George D. Jackson Jr: Comintern and Peasant in Eastern Europe 1919-1930, New York and London 1966, pp. 172-180; Geschichte der Bulgarischen Kommunistischen Partei, Sofia 1986, pp. 73-100. From a Marxist perspective see e.g. ECCI Appeal to the Workers and Peasants of Bulgaria to Oppose the new Bulgarian Government, 23 June 1923; in: Jane Degras: The Communist International 1919-1943. Documents, Volume II 1923-1928, pp. 47-51; Karl Radek: Der Umsturz in Bulgarien (23.6.1923), in Die Kommunistische Internationale, No. 27 (August 1923), pp. 3-41; Grigori Sinowjew: Die Lehren des bulgarischen Umsturzes, in Die Kommunistische Internationale, No. 27 (August 1923), pp. 41-47.
 Trotsky’s writings on the Spanish Revolution are collected in Leon Trotsky: The Spanish Revolution (1931-39), Pathfinder Press, New York 1973. In addition, we would refer – in place of many works – to the account of the US Trotskyist Felix Morrow who went to Spain as a volunteer to fight the fascists: Felix Morrow: The Civil War in Spain, Pioneer Publisher, New York 1936. See also Pierre Broué and Emile Témime: The Revolution and the Civil War in Spain (1970), Haymarket Books, Chicago 2008; The Spanish Civil War. The View from the Left, Revolutionary History Vol. 4, No. 1/2, London 1992
 Again, there exists a vast amount of Marxist literature on the Pinochet coup in Chile. To name just a few: Michel Raptis: Revolution and Counter-Revolution in Chile, Allison & Busby, London 1973; Tariq Ali: Die Lehren von Chile, Rote Hefte der GIM, Berlin/Hamburg; Widerstand in Chile. Aufrufe, Interviews und Dokumene des M.I.R., Verlag Klaus Wagenbach, Berlin 1974; Fernando Mires: Die Militärs und die Macht. Thesen zum Fall Chile, Rotbuch Verlag, Berlin 1975. The analysis from our side has been published by our predecessor organization Workers Power: The Lessons of Chile, in: Workers Power No. 45 (September 1983), pp. 4-5
 The RCIT has published numerous documents on the coup in Egypt which can be read at www.thecommunists.net/worldwide/africa-and-middle-east/. The most important documents of those which we have published in the weeks after the coup are the following: Yossi Schwartz: Israel and the Coup in Egypt, 21.8.2013, www.thecommunists.net/worldwide/africa-and-middle-east/israel-and-egypt-coup; Michael Pröbsting: The Coup d'État in Egypt and the Bankruptcy of the Left’s “Army Socialism”. A Balance Sheet of the coup and another Reply to our Critics (LCC, WIVP, SF/LCFI), 8.8.2013, www.thecommunists.net/worldwide/africa-and-middle-east/egypt-and-left-army-socialism; Yossi Schwartz: Egypt: Mobilize Resistance against the reactionary military regime!, 27.7.2013, www.thecommunists.net/worldwide/africa-and-middle-east/egypt-no-to-military-regime; Michael Pröbsting: The Military’s Coup d'État in Egypt: Assessment and Tactics, 17.7.2013, www.thecommunists.net/worldwide/africa-and-middle-east/egypt-meaning-of-coup-d-etat; Yossi Schwartz: Egypt: The U.S. Support for the Military Coup and the Left’s ignorance. Notes on the role of US imperialism in the military’s coup d’état and the failure of the Egypt left, 11.7.2013, www.thecommunists.net/worldwide/africa-and-middle-east/egypt-us-support-for-military-coup; RCIT: Egypt: Down with the Military Coup d’État! Prepare Mass Resistance! 8.7.2013, www.thecommunists.net/worldwide/africa-and-middle-east/egypt-down-with-military-coup-d-etat. All these articles and essays were published in the RCIT’s journal Revolutionary Communism No. 12 and 13.
 On the coup in Thailand see the following RCIT documents: RCIT: Thailand: Defeat the looming reactionary Coup D’état! https://www.thecommunists.net/worldwide/asia/thailand-looming-coup-d-%C3%A9tat/; RCIT: Thailand: Smash the Developing Military Coup! https://www.thecommunists.net/worldwide/asia/thailand-coup/; Michael Pröbsting: Thailand: How Should Socialists Fight Against the Coup? https://www.thecommunists.net/worldwide/asia/thailand-coup-critique/; Michael Pröbsting: Thailand: Ultra-Leftism and the Coup, https://www.thecommunists.net/worldwide/asia/thailand-coup-reply/. All these articles were published in the RCIT’s journal Revolutionary Communism No. 23.
 See e.g. on the coup in Brazil the following RCIT documents: CCR: Brazil: The Only Way Forward: Defeat the Coup with Mass, Independent Class Mobilizations of the Working Class and Oppressed! 22.4.2016, https://www.thecommunists.net/worldwide/latin-america/statement-on-coup/; CCR: Brazil: Right-Wing Opposition threatens with a Coup d’État, 18.11.2014, https://www.thecommunists.net/worldwide/latin-america/brazil-coup-danger/
 For an overview of the approach of the Marxist classics on military coups see e.g. Michael Pröbsting: The Coup d’État in Egypt and the Bankruptcy of the Left’s “Army Socialism”, Chapter III. “The Marxist classics on reactionary coups d’états”, in: Revolutionary Communism No. 13 (September 2013), pp. 30-33, https://www.thecommunists.net/theory/egypt-and-left-army-socialism/
 Grigori Sinowjew: Die Lehren des bulgarischen Umsturzes, in Die Kommunistische Internationale, No. 27 (August 1923), p. 45 (our translation)
 Leon Trotsky: Is Victory Possible in Spain? (1937), in: Leon Trotsky: The Spanish Revolution (1931-39), Pathfinder Press, New York 1973, p. 257