How to Run a Code Blue: Roles, Protocols, and Procedures

Running a Code Blue means orchestrating a coordinated team response to an in-hospital cardiac arrest, where every second of delay and every lapse in role clarity can reduce a patient’s chance of survival. Hospitals that formalize their code blue systems with defined roles, structured communication, and regular practice drills see measurably better resuscitation outcomes than those that leave responses to improvisation.1PubMed Central. Analysis of functioning and efficiency of a code blue system in a tertiary care hospital The process involves far more than chest compressions: it requires a team leader who directs traffic, specialists managing the airway and rhythm analysis, nurses pushing medications on precise timelines, and a recorder keeping track of it all.

Activating the Code and the First Sixty Seconds

A Code Blue is triggered when a patient is found unresponsive, not breathing normally, and without a pulse. Anyone can activate it, from a bedside nurse to a visiting family member who alerts staff. The activation method varies by hospital but typically involves calling an overhead page, pressing a dedicated button, or dialing an emergency extension. The moment the code is called, the clock starts, and the priorities are simple: begin chest compressions immediately and get the defibrillator to the bedside.

The first person on scene should not wait for the full team to assemble. Starting compressions within seconds is the single most impactful action in the early phase, because the heart and brain lose perfusion rapidly once circulation stops. In most hospitals, a “crash cart” with a defibrillator, airway equipment, and emergency medications should be within a short sprint of any patient care area. While one rescuer begins compressions, another should be attaching defibrillator pads so the rhythm can be analyzed as soon as possible.

Team Roles and Why They Need to Be Assigned Before Arrival

A Code Blue team typically includes five to eight people with clearly pre-assigned roles. Research consistently shows that restructuring code teams so each member knows their specific job before they walk into the room leads to significant improvements in both confidence and performance.2PubMed Central. Finding the key to a better code: code team restructure to improve performance and outcomes The core roles usually break down like this:

  • Team leader: Directs the overall resuscitation, makes decisions about drugs and interventions, and maintains situational awareness. This person does not perform hands-on tasks like compressions or intubation. Their job is to think, decide, and communicate.
  • Compressor: Performs chest compressions, rotating with another team member every two minutes to avoid fatigue-related quality drops.
  • Airway manager: Manages ventilation, starting with bag-valve-mask ventilation and escalating to advanced airway placement if needed. Often a respiratory therapist or anesthesiologist.
  • Defibrillator operator: Manages the monitor/defibrillator, analyzes rhythms, charges and delivers shocks when indicated, and announces findings to the team leader.
  • Medication nurse: Draws up and administers drugs as ordered, manages IV or intraosseous access, and announces when medications are given and when the next doses are due.
  • Recorder: Documents the timeline of events, including when compressions started, each medication dose, rhythm checks, and shocks delivered. This role is often underappreciated but is critical for both real-time decision-making and post-event review.

Some institutions add a dedicated “runner” who retrieves additional supplies and a “crowd controller” who keeps unnecessary personnel out of the room. The specific number matters less than the principle: everyone who arrives should know exactly what they are doing. A room full of well-intentioned clinicians who all try to manage the airway or call out orders simultaneously is a recipe for chaos. One study found that even brief leadership instruction, just ten minutes covering how to delegate tasks, speak in short clear directives, and follow the standard algorithm, improved the speed and quality of CPR performance in simulated codes.3PubMed Central. Code Blue Emergencies: A Team Task Analysis and Educational Initiative

Chest Compressions That Actually Work

Guidelines call for compressions at a rate of 100 to 120 per minute, pushed to a depth of at least two inches in adults, with full chest recoil between each compression. That last detail, letting the chest fully spring back, is often overlooked but profoundly affects blood flow. Animal research has demonstrated that incomplete chest wall recoil significantly reduces coronary and cerebral perfusion pressures, effectively undermining the purpose of compressions even when the rate and depth look fine.4PubMed. Effects of incomplete chest wall decompression during cardiopulmonary resuscitation on coronary and cerebral perfusion pressures in a porcine model of cardiac arrest The mechanism is straightforward: leaning on the chest between compressions raises pressure inside the thorax, which blocks blood from returning to the heart.

Compression quality degrades rapidly with fatigue, which is why rotating compressors every two minutes is standard protocol. The switch should happen quickly, ideally during a rhythm check, so pauses in compressions stay as short as possible. Minimizing interruptions is one of the strongest predictors of survival. When hospitals adopted a “pit crew” model that choreographed compressor switches and other tasks around a strict timeline, compression rates improved and team communication jumped from about a third of teams communicating adequately to essentially all of them.5PubMed. Code blue pit crew model: A novel approach to in-hospital cardiac arrest resuscitation

Airway Management During the Code

Airway management during cardiac arrest follows a stepwise approach. The initial method for most patients is bag-valve-mask ventilation, where a rescuer manually squeezes a bag to push air into the lungs through a face mask. This is simple, fast, and requires no special equipment beyond what is already on the crash cart. Advanced airways like endotracheal tubes or supraglottic devices may be placed later, but the evidence supporting early intubation during cardiac arrest is surprisingly weak.

A systematic review of prehospital airway studies found no survival advantage for endotracheal intubation or supraglottic airways over basic bag-valve-mask ventilation in either adults or children with cardiac arrest.6PubMed. Prehospital Airway Management: A Systematic Review In pediatric out-of-hospital arrests, bag-valve-mask ventilation was actually associated with higher survival to hospital discharge compared to both endotracheal intubation and supraglottic airways.7PubMed Central. A comparison of pediatric airway management techniques during out-of-hospital cardiac arrest using the CARES database The takeaway for code teams is not that advanced airways are useless, but that they should never come at the cost of interrupted chest compressions. If bag-valve-mask ventilation is working and compressions are high quality, rushing to intubate can do more harm than good.

Reading the Rhythm and Deciding Whether to Shock

Every two minutes, the team pauses compressions briefly to check the heart rhythm on the monitor. The rhythm determines the next steps. There are two broad categories: shockable rhythms and non-shockable rhythms. Ventricular fibrillation and pulseless ventricular tachycardia are shockable, meaning a defibrillator can potentially reset the electrical activity of the heart. Asystole (flatline) and pulseless electrical activity are non-shockable, and the only treatments for those are continued CPR, medications, and identifying whatever caused the arrest in the first place.

The initial rhythm is one of the strongest predictors of whether a patient will survive. Most in-hospital cardiac arrests present with a non-shockable rhythm, and multiple studies have consistently shown poorer outcomes for those patients compared to patients found in a shockable rhythm.8PubMed Central. Code blue: Predictors of survival This does not mean non-shockable rhythms are hopeless, but the team leader should recognize that the prognosis is more guarded and that finding and treating a reversible cause becomes even more urgent.

Medications and Their Timing

Epinephrine is the cornerstone drug of cardiac arrest management, given intravenously at a dose of 1 mg every three to five minutes. For non-shockable rhythms, it is given as soon as IV access is established. For shockable rhythms, it is typically given after the first or second failed defibrillation attempt. The medication nurse should announce each dose and the time it was given so the recorder and team leader can track intervals.

For shockable rhythms that persist despite multiple defibrillation attempts, antiarrhythmics enter the picture. Amiodarone is the most commonly used, and timing matters: when given early, amiodarone significantly improved survival to hospital discharge compared to placebo, but when given later in the resuscitation, no survival benefit was seen.9PubMed. Survival by time-to-administration of amiodarone, lidocaine, or placebo in shock-refractory out-of-hospital cardiac arrest Lidocaine, the older alternative, did not show a significant benefit over placebo at any time point in that same analysis. For dosing, a recent study comparing 300 mg to 450 mg of amiodarone found that the standard 300 mg dose was associated with a higher probability of achieving return of spontaneous circulation, suggesting that more is not better here.10PubMed. Amiodarone dose in patients with shockable out-of-hospital cardiac arrest

Searching for Reversible Causes

While compressions, ventilation, and medications keep the resuscitation moving forward, the team leader should simultaneously be thinking about why the patient arrested. Advanced cardiac life support protocols emphasize the identification of reversible causes as a central part of the algorithm.11PubMed Central. Singapore Advanced Cardiac Life Support Guidelines 2021 The classic memory aid is the “H’s and T’s,” a checklist of conditions that can cause or worsen cardiac arrest and that have specific treatments:

  • Hypovolemia: Massive blood loss or dehydration, treated with volume resuscitation.
  • Hypoxia: Lack of oxygen, treated by securing the airway and ensuring ventilation.
  • Hydrogen ion excess: Severe acidosis, potentially treated with sodium bicarbonate.
  • Hypo/hyperkalemia: Potassium imbalances that destabilize the heart, treated with calcium, insulin, or other electrolyte corrections.
  • Hypothermia: Severe cold exposure, requiring active rewarming.
  • Tension pneumothorax: Air trapped in the chest cavity compressing the heart, treated by needle decompression.
  • Tamponade: Fluid around the heart restricting its movement, treated by pericardiocentesis.
  • Toxins: Drug overdoses or poisonings, treated with specific antidotes.
  • Thrombosis (pulmonary): Massive pulmonary embolism, potentially treated with thrombolytics.
  • Thrombosis (coronary): Heart attack, potentially requiring emergent catheterization.

A code where the team runs through compressions and medications without considering reversible causes is a code that may be treating the symptom without touching the disease. The team leader should verbalize the differential out loud so team members can contribute relevant clinical information: recent lab values, surgical history, medication changes, or observations from the bedside nurse who was last with the patient.

Communication That Prevents Errors

Closed-loop communication is the most widely recommended communication technique for resuscitation teams. The idea is simple: the team leader gives an order by name (“Sarah, give 1 mg epinephrine IV”), the recipient repeats it back (“1 mg epinephrine IV”), and then confirms when completed (“Epinephrine is in”). Research on simulated clinical emergencies has shown that when orders are both directed to a specific person and confirmed via closed-loop communication, the requested action is completed essentially every time, compared to roughly four out of five times when neither technique is used.12PubMed Central. Use and effectiveness of directed, closed-loop communication in the operating theatre: mixed methods analysis of simulated clinical emergencies

This matters because the noise and urgency of a code make it remarkably easy for orders to get lost, duplicated, or misheard. Training in closed-loop communication decreases medical errors and improves task efficiency.13PubMed Central. Advanced closed-loop communication training: the blindfolded resuscitation The team leader should also provide regular verbal updates to keep everyone oriented: “We are at the six-minute mark, rhythm check in one minute, next epi due now.” These brief summaries help the recorder and the rest of the team stay synchronized.

What Happens After the Heart Restarts

Achieving return of spontaneous circulation is not the end of the code. It is the beginning of a different, equally demanding phase of care. The 2025 American Heart Association guidelines for post-cardiac arrest care address initial targets for blood pressure, oxygen, ventilation, glucose, temperature control, and diagnostic testing to determine the cause of the arrest.14PubMed. Part 11: Post-Cardiac Arrest Care: 2025 American Heart Association Guidelines for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care

Temperature management has been a major focus of post-arrest care for over a decade. International guidelines recommend maintaining a constant temperature between 32°C and 36°C for at least 24 hours in adults resuscitated from cardiac arrest, regardless of the initial rhythm.15PubMed. Temperature Management After Cardiac Arrest: An Advisory Statement by the Advanced Life Support Task Force of the International Liaison Committee on Resuscitation and the American Heart Association Emergency Cardiovascular Care Committee and the Council on Cardiopulmonary, Critical Care, Perioperative and Resuscitation The goal is to protect the brain from the cascading injury that occurs when blood flow is restored after a period of oxygen deprivation. Blood pressure management also matters. In patients undergoing temperature management, keeping the mean arterial pressure in a moderate range around the 48-hour mark was associated with better neurological outcomes at discharge, and a heart rate exceeding roughly 93 beats per minute at 24 hours was independently associated with mortality.16PubMed. Association of hemodynamic variables with in-hospital mortality and favorable neurological outcomes in post-cardiac arrest care with targeted temperature management

When Standard CPR Is Not Enough

Some cardiac arrests do not respond to standard resuscitation. When a patient remains in refractory arrest despite prolonged high-quality CPR, medications, and defibrillation, extracorporeal CPR is an option at hospitals equipped for it. This involves rapidly connecting the patient to a machine that takes over the function of the heart and lungs, pumping and oxygenating blood mechanically. Observational data suggest improved outcomes when this technology is deployed within 30 to 60 minutes of arrest onset in selected patients.17PubMed Central. Extracorporeal membrane oxygenation for refractory cardiac arrest

A randomized trial comparing extracorporeal CPR to conventional CPR in refractory out-of-hospital arrest found that about 20% of the extracorporeal group were alive with favorable neurological outcomes at 30 days, compared to 16% in the conventional group, but the difference was not statistically significant.18PubMed. Early Extracorporeal CPR for Refractory Out-of-Hospital Cardiac Arrest The technology is resource-intensive and only available at centers with existing life support programs, so it is not part of the standard code blue at most hospitals. But for institutions that have it, establishing protocols for rapid deployment is key.

Pediatric Codes Follow Different Rules

Running a code on a child or infant is not simply a scaled-down version of an adult resuscitation. The algorithms differ in meaningful ways depending on the patient’s age. For neonates in the delivery room, the Neonatal Resuscitation Program prioritizes airway and breathing before compressions (the traditional A-B-C sequence), because most neonatal arrests are caused by respiratory failure rather than a primary cardiac event. By contrast, the Pediatric Advanced Life Support algorithm for older infants and children follows the same compression-first approach used in adults (C-A-B).

The compression-to-breath ratios also differ. Neonatal resuscitation uses a 3:1 ratio of compressions to breaths, reflecting the respiratory etiology, while pediatric codes use 15:2 for two-rescuer CPR. Even epinephrine dosing is different: neonatal protocols call for 0.02 mg/kg, while pediatric protocols use 0.01 mg/kg. These distinctions mean a team that is comfortable running adult codes may stumble in a pediatric resuscitation without specific training, and hospitals with mixed adult-pediatric populations need clear signage and crash cart configurations that support the right algorithm for the patient’s age.

The Crash Cart Itself Matters More Than You Think

A well-organized crash cart is not a luxury. It is a patient safety tool. When a code is underway and someone needs to grab the right medication or the correct-size airway equipment under pressure, having to rummage through disorganized drawers costs seconds and introduces errors. Quality improvement projects that applied human factors principles to crash cart design, organizing drawers to mirror the flow of the resuscitation algorithm, reduced the time to locate lifesaving items and decreased errors in grabbing the wrong equipment.19PubMed Central. Improving Efficiency and Usability of the Pediatric Code Cart by Combining Lean and Human Factors Principles In units that care for both neonates and older children, aligning the crash cart layout with both the neonatal and pediatric algorithms helps staff switch between protocols without confusion.20Advances in Neonatal Care. Optimal Crash Cart Configuration for a Surgical NICU: Utilizing Human Factors Principles

Standardization across units also helps. A nurse floated to an unfamiliar floor should be able to open the top drawer and find the same things in the same arrangement. Hospitals that standardize cart layout institution-wide remove one cognitive burden from an already overwhelming situation.

Preventing the Code in the First Place

Many in-hospital cardiac arrests are preceded by hours of warning signs: abnormal vital signs, worsening lab values, or clinical deterioration that, if caught and acted on, could have prevented the arrest entirely. Research underscores the importance of early warning scores and continuous monitoring for patients at risk.21PubMed Central. Understanding Code Blue Activations: Insights From Early Warning and Palliative Scores in a Tertiary Hospital Rapid response teams, sometimes called medical emergency teams, exist to intervene at this stage, evaluating and stabilizing deteriorating patients before they arrest.

One tertiary hospital in India that implemented a rapid response team saw code blue events drop from roughly 2.3 to 1.5 per 1,000 admissions, though the change did not reach statistical significance in that study.22PubMed Central. Assessing the Impact of a Rapid Response Team on Code Blue Incidents and Hospital Mortality Rate: Evidence From a Tertiary Care Hospital in India A nurse-led medical emergency response system showed more striking results, reducing code blue team activations by an estimated 58% per quarter for non-hospitalized patients.23Resuscitation Plus. Nurse-led medical emergency response reduces code blue team activations in non-hospitalized patients The pattern across many institutions is consistent: catching deterioration early is one of the most effective ways to reduce the number of codes that need to be run at all.

Training Through Simulation

Even a perfectly designed code blue protocol is useless if the team has never practiced it together. Mock code blue simulations, where teams run through a simulated cardiac arrest on a mannequin, are one of the most effective tools for improving real-world outcomes. Hospitals that conducted more in-situ mock codes (roughly 18 per 100 beds per year versus 3 per 100 beds per year) had a significantly higher survival rate after in-hospital cardiac arrest: about 43% compared to 32%.24PubMed. Hospitals with more-active participation in conducting standardized in-situ mock codes have improved survival after in-hospital cardiopulmonary arrest That is a striking difference, and it held even after adjusting for the expected mortality at each hospital.

What makes in-situ simulation particularly valuable is that it tests the system, not just the clinicians. Running a mock code on the actual ward reveals problems that classroom training cannot: the crash cart that takes too long to wheel around a corner, the overhead page that cannot be heard in a certain hallway, the lack of a stool for shorter staff to reach the bed for effective compressions. Programs that combined mock codes with dedicated didactic teaching over several months were able to demonstrate improvements in both clinical competency and patient survival outcomes.25PubMed Central. The Effect of Mock Code Blue Simulations and Dedicated Advanced Cardiac Life Support Didactics on Resident Perceived Competency

Debriefing After Every Code

Once the code is over, whether the patient survived or not, the team should debrief. Post-code debriefing is important for team learning, clinical improvement, and the emotional support of staff who just participated in a life-or-death event.26PubMed Central. Enhancing Post-Code Blue Debriefing through Identification and Overcoming Barriers Encountered by Healthcare Practitioners These sessions can be brief, often just ten to fifteen minutes, and should cover what went well, what could be improved, and whether any system issues (equipment failures, delayed response times, communication breakdowns) need to be addressed.

Debriefing also improves CPR quality and identifies systemic barriers that no amount of individual training can fix.27Digital Commons @PVAMU. Improving Post-Resuscitation Debriefing Completion Rates In An Acute Care Community Hospital: A Quality Improvement Project Despite these benefits, debriefing is one of the most commonly skipped steps. Staff scatter to attend to other patients, the emotional weight of the event makes reflection uncomfortable, and there is often no formal structure in place to ensure it happens. Institutions that build debriefing into their code blue policy as a mandatory step, rather than an optional one, tend to sustain higher completion rates.

Ethical Dimensions of Starting and Stopping

Not every patient should receive CPR, and not every code should continue indefinitely. Do-not-resuscitate orders exist so that patients (or their surrogates) can decline resuscitation in advance when it is not consistent with their goals of care. In many hospitals, however, CPR remains the default for every patient who arrests unless a DNR order is explicitly documented. This creates situations where clinicians perform resuscitation they believe is futile or contrary to the patient’s interests. “Slow codes,” where staff go through the motions without genuine effort, are a recognized but ethically problematic workaround that some clinicians resort to when they feel trapped by inadequate policies.28PubMed Central. Slow Codes are symptomatic of ethically and legally inappropriate CPR policies

The more honest approach involves better upstream conversations. Respect for patient autonomy is best realized through honest discussions about prognosis, shared decision-making, and advance care planning well before a crisis.29PubMed. Ethical challenges in resuscitation When a code is underway on a patient without a DNR, the decision to stop resuscitation rests with the team leader, who must weigh the duration of the arrest, the rhythm, the response to interventions, and the clinical context. There is no universal time limit. Some patients with reversible causes have been successfully resuscitated after prolonged efforts, while others with devastating underlying disease have no meaningful chance regardless of duration.

Family Presence During Resuscitation

Whether to allow family members to be present during a code blue has been debated for decades. Many clinicians worry that it will be traumatic for the family or distracting for the team. The evidence, however, points the other way. A Cochrane review found that family members who were present during resuscitation had significantly fewer symptoms of post-traumatic stress, anxiety, depression, and complicated grief compared to those who were kept out of the room. Importantly, the presence of family did not affect the duration of the resuscitation or the stress levels of the healthcare team.30PubMed Central. Family presence during resuscitation When institutions offer family presence, assigning a staff member to stay with the family, explain what is happening in real time, and provide emotional support helps the experience go more smoothly for everyone involved.