What's strange is that in order to reproduce this hang, we have to send a particular command to the Shell that change the behavior of the shell app. Further, the command needs to be sent at a particular time. If we don't send the command, the hang does not occur. If we send it earlier or later, the hang does not occur. If we send it at the right time, the hang occurs after some number of additional commands are sent to the shell. The timer I mentioned above control the frequency at which those additional commands are sent. The faster those additional commands are sent, the faster the hang will occur. So it seems that a particular command puts the app in state where it's going to eventually hang, and then sending some number of additional commands triggers the hang. All commands are JSON strings sent via Shell.WriteLine().