The deadlock happens when returning results. (Wasm's single thread blocks indefinitely waiting for results that will come over the network, and so that thread can't receive those results from the extension. With send, the thread is yielded periodically, so the deadlock is broken.) ATTACH is a bit special; I'm unsure if the deadlock condition can occur in that case. I'd go through send for everything that talks to MotherDuck to be safe, but you could run some tests and see if it hangs - it's usually pretty easy to trigger