For example, this document will read `args` and `output_file` from the environment created by `shiny_prerendered_html()`'s invocation. --- title: "Untitled" output: html_document runtime: shiny_prerendered --- ```{r} args output_file ``` The result looks like this:  The culprit is this `new.env()`: https://github.com/rstudio/rmarkdown/blob/6def14c/R/shiny_prerendered.R#L125 Perhaps it should have `parent=globalenv()`?