This would allow for reproducibility of knitr::knit() in contexts where calling R code before knitr::knit() is not easy.
set.seed(123)
knit::knit()
set.seed(123)
knit::knit()
But in rmarkdown ran in background context or within quarto, this is not possible to do without modifying the document, or leveraging .Rprofile
Maybe having something like set.seed(knitr::opts_knit$get("set.seed")) would work, as it can also be set using env var and R options.
Related to question at: