They can be done either with the clamp still on or after removing the aortic clamp and isolating a small segment of the aorta by placing a partial clamp (but atheromatic aortas might be damaged by overhandling them; atheromatic derbis might get detached and cause embolization in end organs)
Weaning from cardiopulmonary bypass and closureAfter the proximal anastomoses are done, the clamp is removed, aorta and conduits deaired, pacing wires might be placed if indicated and if the heart and other systems are functioning well CBP is discontinued,  cannulas removed and protamine is administered to reverse the effect of heparin . After possible bleeding sites are checked, chest tubes are placed and sternum is closed. Off-pump (OPCABG)
Off-pump coronary artery bypass graft (OPCABG) surgery avoids using CPB machine by stabilizing small segments of the heart. It takes great care and coordination among the surgical team and anesthesiologists to not manipulate the heart too much so hemodynamic stability will not be compromised; however, if it is compromised, it should be detected immediately and appropriate action should be taken. To keep heart beating effectively, some maneuvers can take place like placing atrial wires to protect from bradycardia, placing stitches or incisions to pericardium to help exposure. Snares and tapes are used to facilitate exposure. the aim is to avoid distal ischemia by occluding the vessel supplying distal portions of the left ventricle, so usually LIMA to LAD is the first to be anastomosed and others follow.
Noninvasive tests (as stress test, nuclear imaging, dobutamine stress echocardiography) help estimate which patients might benefit from undergoing coronary angiography. Many factors are taken into account but generally, people whose tests reviled that portions of cardiac wall receive less blood that normally should proceed with coronary angiography. There, lesions are identified and a decision is taken whether patient should undergo PCI or GABG.Generally,  CABG is preferred over PCI  when there is significant atheromatic burden on the coronaries, that is extensive and complex. According to current literature, decreased LV function, LM disease, complex triple system disease (including LAD, Cx and RCA) especially when the lesion at LAD is at its proximal part and diabetes, are  factors that point patients will benefit more from CABG rather than PCI. Acute coronary syndrome
During an acute heart event, named acute coronary syndrome, it is of vital importance to restore blood flow to the myocardium as fast as possible. Typically, patients arrive at hospital with chest pain. Initially they are treated with medical drugs, particularly the strongest drugs that prevent clots within vessels (dual antiplatelet therapy: aspirin and a P2Y12 inhibitor-like clopidogrel). Patients at risk of ongoing ischemia, undergo PCI and restore blood flow and thus oxygen delivery to the struggling myocardium. In cases where PCI failed to restore blood flow because of anatomic considerations or other technical problems, urgent CABG is indicated to save myocardium.