Is there a way to evaluate some expression in a subsession of another already running kernel, collecting the output, from a Local monitoring kernel? Something like
result1 = EvaluateInSubsession[expr1, kernel1] result2 = EvaluateInSubsession[expr2, kernel2]
Added in clarification. This is useful while running independent computations in different kernels, and one would like to collect some monitoring information from them. The idea is to automate what one would do by evaluating in subsession within separate notebook frontends.
Something can indeed be done manually or via the frontend tokens: I added below a possible solution, not entirely satisfactory.
The perfect solution would instead be if one could enter a subsession programmatically, something like
CurrentValue[nb, Evaluator] = kernel1; NotebookEvaluate[nb, Method->"Subsession"] <------- ☹️