The rule is that closures passed to the primary Task initializer from an isolated context inherit that isolation. Currently there is an exception that this does not happen when the outer context is actor-isolated and the closure doesn't capture that actor, but we've discussed removing that exception because it's quite confusing in practice.
3 Likes