I agree that during normal operation there should always be one /xhr request that is waiting for a response (the console output) while the /xhr_send requests send the console input. When there is no output the /xhr request returns after 25s and then another /xhr request is started in its place. The /xhr_send requests happen constantly while you're typing (not just when pressing enter) with each request sending one or more characters of input.
On the proxied connection there are two failure cases I'm seeing:
-An /xhr_send request returns promptly (<1s) but the polling /xhr request does not immediately return with the corresponding output. Instead the /xhr request eventually returns after >30s with code 200 but an empty response, which causes the console to reset its connection.
-An /xhr_send request takes a long time (>30s) to return but once it does return, the polling /xhr request immediately returns with the corresponding output. This doesn't make the console reset its connection but of course makes it freeze for >30s, after which it starts working again.
I believe that on my home unproxied connection the underlying problems are the same but I'll need to check again now that I understand it better. At home the symptoms are the same at least - the console sometimes resets its connection and sometimes just freezes for a while.
There do seem to be periods where it's better than others, as I was able to use the console for a few minutes this morning without it freezing/resetting but now it's regularly doing it again. Hopefully this is useful, let me know if there's anything else I can provide.