This article reports on a study investigating how computational essays can be used to help students in higher education STEM take up disciplinary epistemic agency—cognitive control and responsibility over one's own learning within the scientific disciplines. Computational essays are a genre of scientific writing that combine live, executable computer code with narrative text to present a computational model or analysis. The study took place across two contrasting university contexts: an interdisciplinary data science and modeling course at a large research university in the Midwestern United States, and a third‐semester physics course at a large research university in Scandinavia. Over the course of a semester, computational essays were simultaneously and independently used in both courses, and comparable datasets of student artifacts and retrospective interviews were collected from both student populations. These data were analyzed using a framework that operationalized the construct of disciplinary epistemic agency across the dimensions of programming, inquiry, data analysis and modeling, and communication. Based on this analysis, we argue that computational essays can be a useful tool for fostering disciplinary epistemic agency within higher education science due to their combination of adaptability and disciplinary authenticity. However, we also argue that educational contexts, scaffolding, expectations, and student backgrounds can constrain and influence the ways in which students choose to take up epistemic agency.