Some very small percentage of tasks fail with a "Text file busy" error.
The following was the original diagnosis:
Our use of PrintWriter in TaskController.writeCommand is unsafe, since that class swallows all IO exceptions. We're not currently checking for errors, which I'm seeing result in occasional task failures with the message "Text file busy" - assumedly because the close() call is failing silently for some reason.
.. but turned out to be another issue as well (see below)