It appears that Python doesn't reliably (or maybe just doesn't at all) flush and close non-standard FDs on exit. This randomly caused the artefacts list to get lost to /dev/null.