How to Run a Code — A Guide for IM Medicine Interns

How to Run a Code — A Guide for IM Medicine Interns

Running a Code Blue as an Internal Medicine Intern: Your Step-by-Step Guide

Let's be honest, the first time you're called to a code blue, your heart rate probably matches the monitor. You've seen it on TV, heard about it in the halls, maybe even participated in a mock code during orientation, but nothing truly prepares you for the real thing.

Here's what I wish someone had told me before my first actual code: you don't need to have all the answers memorized. You need a framework. A system. Something to fall back on when your brain goes blank and the room is chaos.

This guide walks you through exactly that. We're covering team roles, ACLS algorithms, communication strategies, and the practical stuff that actually matters when seconds count.

Your Role on the Code Team

First, understand that not every intern is the code leader. In fact, most of you will be team members for a while before you're trusted to run the show. Both roles are important, and both require different skill sets.

If You're the Code Leader

The code leader's job isn't to do everything themselves. It's to coordinate everyone else. Think of yourself as the conductor of an orchestra, not the soloist.

Your primary responsibilities:

  • Declare leadership immediately upon entering the room. "I'm taking the lead on this code."
  • Delegate tasks using closed-loop communication (more on that in a minute).
  • Perform the initial assessment: Airway, Breathing, Compressions, Defibrillation, Epinephrine.
  • Gather a quick history from the bedside nurse or chart. What happened right before the code?
  • Order tests and procedures, but delegate them to qualified team members.
  • Ensure high-quality CPR with minimal interruptions.
  • Rotate compressors every two minutes.
  • Decide when to continue or stop the code.

The key leadership quality? Think out loud. Verbalize your thought process. "I'm checking for a pulse now, give me five seconds." "We've had two shocks, time for epinephrine." This keeps everyone on the same page and helps you catch mistakes before they become disasters.

If You're a Team Member

Your job is simpler in some ways, but no less important. You have a specific role, and you need to execute it well.

Common roles include:

  • Compressor: High-quality chest compressions at 100-120 per minute, depth of 2 to 2.4 inches, full chest recoil. Count them out loud. Rotate every two minutes.
  • Airway: Bag-mask ventilation, high-flow oxygen, suctioning. Assist with intubation if needed.
  • Recorder/Timer: Track everything. Arrest time, rhythm checks, shocks (times and joules), medications given, intubation time, ROSC. Document it all on the ACLS flowsheet.
  • Medication Support: Administer IV medications, hang fluids, obtain ECGs, establish IV or IO access.

No matter your role, use closed-loop communication when receiving orders. Repeat back what you heard. Confirm you understood correctly.

The ACLS Algorithm: Shockable Rhythms (VF and pVT)

Ventricular fibrillation and pulseless ventricular tachycardia are shockable rhythms. The good news: they're the ones with the best chance of survival if treated quickly. The bad news: every second without defibrillation decreases your odds.

The Basics

Early defibrillation is the cornerstone of managing these rhythms. High-quality CPR with minimal interruptions buys time until the defibrillator is ready.

Here's the 2025 AHA algorithm in a nutshell:

  • Start CPR immediately
  • Attach defibrillator and analyze rhythm
  • If shockable, deliver one shock
  • Immediately resume CPR for two minutes (don't pause for pulse or rhythm check)
  • After two minutes, brief rhythm check (10 seconds max)
  • If still shockable, deliver another shock and repeat

Defibrillation Details

Most hospital defibrillators are biphasic. Use the manufacturer's recommended dose, typically 120 to 200 joules for the first shock. If you don't know the dose, use the maximum available. Subsequent shocks should be at equal or higher energy.

For monophasic defibrillators (rare these days), use 360 joules.

Key point: resume CPR immediately after each shock. Don't pause to check for a pulse or rhythm. The two-minute cycle is non-negotiable.

Medications

Epinephrine: 1 mg IV or IO every 3 to 5 minutes. For shockable rhythms, give it after initial defibrillation attempts fail. It increases myocardial blood flow during CPR, which helps.

Antiarrhythmics (for refractory VF/pVT):

  • Amiodarone: 300 mg IV bolus, then 150 mg if needed
  • Lidocaine: 1 to 1.5 mg/kg IV

The 2025 guidelines don't strongly favor one over the other. Both are reasonable alternatives.

Vascular Access and Airway

IV access is preferred first choice. If you can't get IV access quickly, use intraosseous (IO) access. Don't waste time fumbling with veins when every second counts.

Advanced airway placement increases the rate of ROSC but doesn't improve survival to discharge. Minimize interruptions during placement. Once the airway is in place, do continuous compressions with 10 breaths per minute (one breath every six seconds). Waveform capnography is crucial for confirming airway placement and monitoring CPR quality.

The ACLS Algorithm: Non-Shockable Rhythms (Asystole and PEA)

Asystole and pulseless electrical activity (PEA) are non-shockable rhythms. The approach is different, and the prognosis is generally worse, but you still need to act quickly.

The Basics

High-quality CPR remains the cornerstone. But unlike shockable rhythms, you don't wait around for a defibrillator. You give epinephrine as soon as possible.

The algorithm:

  • Start CPR immediately
  • Attach monitor/defibrillator and confirm rhythm
  • If non-shockable, give epinephrine ASAP (1 mg IV/IO)
  • Continue CPR for two minutes
  • Brief rhythm check (10 seconds max)
  • If still non-shockable, give another dose of epinephrine and repeat

Epinephrine Timing Matters

For non-shockable rhythms, the first dose of epinephrine should be given as soon as feasible after confirming arrest. Delays reduce survival probability. Don't wait for IV access if IO is faster.

Airway Management

Once an advanced airway is in place, give one breath every six seconds with continuous compressions. Avoid excessive ventilation. Target end-tidal CO2 (ETCO2) of at least 10 mmHg during CPR. This confirms CPR quality and can signal ROSC.

Search for Reversible Causes

This is where the H's and T's come in. Unlike shockable rhythms, you need to actively hunt for underlying causes while doing CPR.

The H's and T's: Reversible Causes of Cardiac Arrest

This mnemonic helps you systematically consider what might be causing the arrest. Think through each one as you resuscitate.

The H's

  • Hypovolemia: Hemorrhage (GI bleed, ruptured AAA), severe dehydration, burns. Give fluids.
  • Hypoxia: Airway obstruction, respiratory failure, pneumonia, COPD exacerbation, mechanical ventilation issues. Secure the airway, give oxygen.
  • Acidosis (Hydrogen ion): Respiratory (inadequate ventilation) or metabolic (renal failure, drug overdoses). Address the underlying cause.
  • Potassium abnormalities: Hyperkalemia is the most common electrolyte disorder associated with arrest. Look for peaked T-waves and widened QRS on ECG. Treat with calcium, insulin/dextrose, albuterol.
  • Hypothermia: Less common in hospital settings, but rewarm if suspected.

The T's

  • Toxins: Beta-blockers, calcium channel blockers, TCAs, opioids. Identify the toxin and give antidote if available (naloxone for opioids).
  • Tamponade (cardiac): Compression of the heart by fluid in the pericardial sac. Usually post-cardiac surgery or trauma. Requires pericardiocentesis.
  • Tension pneumothorax: Collapsed lung pressing on the heart and great vessels. Can happen after central line placement, mechanical ventilation, or trauma. Look for absent breath sounds on one side, tracheal deviation, hemodynamic compromise. Needle decompression is life-saving.
  • Thrombosis (pulmonary): Large pulmonary embolism causing acute right heart failure. Treatment: fibrinolytics or surgical embolectomy.
  • Thrombosis (coronary): Acute MI causing VF arrest. Treatment: immediate coronary angiography and PCI.

In hospital settings, cardiac causes account for 50 to 60 percent of arrests, followed by respiratory insufficiency at 15 to 40 percent. Knowing this helps you prioritize your differential.

Post-Cardiac Arrest Care: What Happens After ROSC

Return of spontaneous circulation (ROSC) isn't the end. It's just the beginning of a new phase of care. The brain and other organs have been through a lot, and you need to support them.

Hemodynamic Goals

The 2024 ILCOR and AHA guidelines recommend:

  • Mean Arterial Pressure (MAP): Target at least 60 to 65 mmHg. If you don't have advanced cerebral monitoring, consider aiming for MAP >80 mmHg. Current evidence doesn't support routinely aiming above 70 mmHg.
  • Oxygenation: Avoid both hypoxemia and hyperoxemia. Target SpO2 of 94 to 98 percent or PaO2 of 75 to 100 mmHg. Initially, you can use 100 percent oxygen until you can measure PaO2 reliably.
  • Ventilation: Avoid hypocapnia and hypercapnia. Maintain normocapnia after ROSC.
  • Volume management: Individualize based on the cause of arrest, hemodynamic target, and organ dysfunction. Balanced crystalloid solutions are preferred to minimize hyperchloremia and acute kidney injury risk.

Targeted Temperature Management

This is part of the post-cardiac arrest care bundle. The goal is to optimize neurological recovery. Protocols vary by institution, but generally involve cooling the patient to 32 to 36 degrees Celsius for 24 hours, then gradual rewarming.

Critical Care Management

Beyond hemodynamics and temperature, you need to:

  • Optimize respiratory parameters
  • Maintain blood pressure with vasopressors if needed
  • Identify and treat the underlying cause of the arrest
  • Assess neurological prognosis (this usually happens later, once the patient is awake or sedation is lifted)

Communication: The Secret Weapon

I can't stress this enough. Technical skills matter, but communication is what makes or breaks a code. Here's why.

Closed-Loop Communication

This is a three-step technique:

  1. Sender gives a clear instruction: "Give 1 mg epinephrine IV push."
  2. Receiver repeats it back: "Giving 1 mg epinephrine IV push."
  3. Sender confirms accuracy: "Correct."

This prevents errors and ensures clarity, especially when team members can't see each other's actions. A code leader who doesn't use closed-loop communication can make the entire team dysfunctional.

Psychological Safety

Create an environment where team members feel comfortable speaking up. If someone notices a problem or has a concern, they should feel safe saying something. Leaders should actively encourage this.

Debriefing

After the code, take time to debrief. What went well? What could improve? This reinforces learning, fosters personal growth, and strengthens team unity. Unfortunately, debriefing is often infrequent in practice, despite being crucial.

Training for Confidence

Research shows that many residents lack confidence in non-technical skills like communication, leadership, and situational awareness. Yet these are often the skills that matter most during a code.

Simulation and Mock Codes

Practice in a low-risk environment. Mock codes let you practice leadership, communication, and team coordination without the pressure of a real arrest. Get feedback from attending physicians. The "Mock Code Project" showed significant improvements in resident confidence and skills.

Interprofessional Training

Train with nurses, respiratory therapists, and attendings. This mirrors real-life code dynamics and promotes collaboration. Facilities that implement comprehensive interprofessional code training see improved resuscitation outcomes.

Structured Curricula

Incorporate closed-loop communication as a foundational element in your training. Use experiential learning and simulation to address gaps in non-technical skills.

Practical Tips for Your First Code

Before the Code

  • Know your hospital's code blue activation process
  • Locate defibrillator and code cart locations
  • Understand your role (leader vs. team member)
  • Review ACLS algorithms beforehand

During the Code

If you're the leader:

  • Declare leadership explicitly upon entering the room
  • Assign roles in a fixed order with direct, specific language
  • Use closed-loop communication for all orders
  • Think out loud: verbalize your thought process
  • Focus on process, not individual tasks
  • Rotate compressors every two minutes
  • Consider reversible causes early

If you're a team member:

  • Perform your assigned role to the best of your ability
  • Use closed-loop communication when receiving orders
  • Speak up if you notice problems or have concerns
  • Stay calm and focused

After the Code

  • Complete ACLS flowsheet documentation
  • Participate in debriefing if available
  • Reflect on what went well and what could improve
  • Seek feedback from your attending physician

Final Thoughts

Running a code blue is terrifying the first time. It's also one of the most rewarding experiences in medicine when you save a life. You'll make mistakes. You'll second-guess yourself. That's normal.

What matters is having a system to fall back on. Know your roles. Use closed-loop communication. Think through the H's and T's. And always, always prioritize high-quality CPR with minimal interruptions.

You've got this. And if you ever doubt yourself, remember: every attending physician out there was once an intern in the same position. They survived. You will too.

References

  • 2025 AHA Guidelines for CPR and ECC: https://www.ahajournals.org/doi/10.1161/CIR.0000000000001376
  • ACLS Algorithm Updates 2025: https://acls-algorithms.com/new-2025-aha-acls-guideline-changes/2025-adult-cardiac-arrest-algorithm-changes/
  • Post-Cardiac Arrest Care 2024: https://ilcor.org/news/ilcor-consensus-on-science-with-treatment-recommendations
  • H's and T's of Cardiac Arrest: https://acls.com/articles/reversible-causes-of-cardiac-arrest-hs-and-ts/
  • Code Blue Team Dynamics: https://pmc.ncbi.nlm.nih.gov/articles/PMC12057051/
  • Closed-Loop Communication: https://www.aclsacademy.com/blog/closed-loop-communication-amp-effective-team-dynamics-during-emergencies-tt6gt
  • Mock Code Training Guide: https://cpr.heart.org/-/media/CPR-Files/Courses-and-Kits/Healthcare-Professional/MockCodeTrainingGuide_260217.pdf