Using RStudio API for Nested jobs

Hi, a quick question about nesting one job inside another:

  • Using rstudioapi::jobRunScript, we can source a script as a job running at the background
  • The job starts a new session, with a new global environment (whether we copy the parent global environment or not to it is irrelevant for this question)
  • If I try to call rsutdio::jobRunScript from within that script ran as a job, I'm getting an error that the session is not an RStudio session.

My question: is there a way to do have nested jobs, or at least more generally to just spawn a new session from a parent one and have it run in parallel --- ideally by defining the session of the parent job as an RStudio session?