Opioid-induced respiratory depression (OIRD) confers significant morbidity, but its onset can be challenging to recognize. Pain or stimulation effects of conversation may mask or attenuate common clinical manifestations of OIRD. We asked whether pupillary unrest could provide an objective signal of opioid exposure, and whether this signal would be independent from the confounding influence of extrinsic stimulation. We conducted a cross-over trial of healthy volunteers using identical remifentanil infusions separated by a washout period; in both, pupillary unrest in ambient light (PUAL) was measured at 2.5-min intervals. During one infusion, investigators continuously engaged the subject in conversation, while in the other, a quiet environment was maintained; measures of respiratory depression were compared under each condition. We tested PUAL's relationship to estimated opioid concentration under quiet conditions, measured PUAL's discrimination of lower versus higher opioid exposure using receiver operating characteristic (ROC) analysis, and assessed the effect of stimulation on PUAL versus opioid using mixed effects regression. Respiratory depression occurred more frequently under quiet conditions (p < 0.0001). Under both conditions, PUAL declined significantly over the course of the remifentanil infusion and rose during recovery (p < 0.0001). PUAL showed excellent discrimination in distinguishing higher versus absent-moderate opioid exposure (AUROC = 0.957 [0.929 to 0.985]), but was unaffected by interactive versus quiet conditions (mean difference, interactive - quiet = - 0.007, 95% CI - 0.016 to 0.002). PUAL is a consistent indicator of opioid effect, and distinguishes higher opioid concentrations independently of the stimulating effects of conversational interaction. Under equivalent opioid exposure, conversational interaction delayed the onset and minimized the severity of OIRD.Clinical trial registration: NCT04301895.