The next time this happen again, right-click on your form, inspect element, and then search for "<iframe". Your task form is just embedded into workspace via an iframe, so inspecting element should allow you to see the iframe tag, and grab the url that the iframe is opening.
That url is the url to your form. Try copying that url, and open it in another tab or browser window. Do you still see the same error? If the error is still showing, try refreshing the page a few times. If it still shows the same error, then you have something consistent here. You can log a K2 Support ticket, and show them the error.
Do you perhaps have more than once K2 Blackpearl Server / K2 SmartForms Server?
It could be that once it "hits" one server it fails, but one the other server its fine.
When errors I've inspected the iframe and by looking at the URL it is trying to hit the correct dev server, I've then compared underlying URL with when it does work. They are identical.