RESOLVED: Arduino-cli upload issue "panic: send on closed channel" with ESP32

We do routinely run the ESP-IDF stuff in parallel, though in that case the download step is performed through a call to idf.py rather than calling esptool.py directly. It might be that idf.py does something which makes the ESP-IDF python tools perfectly happy to run multiple sessions in parallel whereas esptool.py called directly does not.

I can fix this locally in our automation scripts by locking the ESP-IDF toolchain just for the download part, so I have a workaround; I guess just be aware if anyone else tries to run multiple copies of arduino-cli in parallel (not unusual in an automated regression test environment) they may hit this issue. It may be worth you adding a "multiple instances" test in whatever setup you have to test arduino-cli itself, just to flush these things out before a user does.