No expert on Bitcoin. How I understand it, loops can be done by UTXO storing a hash of the code it requires to run the next iteration in, and then the next iteration creates a new UTXO and runs it there. And this works for indefinitely long loops as long as someone pays for each step. I assume it can be programmed so that anyone can sign each step (thus removing reliance on certain third parties).
What I’m interested in, is if there is a way to return the result to a “root” UTXO, in a way where it can be authorized that it came from a “thread” that originated from the root, without relying on a trusted third party to sign the callback. I cannot think of a way to do so. This then in analogy to what I described before, the thread itself being able to churn along without specific third parties signing things.











