I've started to refactor the communication protocol now, to allow for more verbose commands and responses. In practice the idea is to start sending json envelopes in both directions and include keys for error messages etc. I'm planning to allow a custom "data" key too, which can be any allowed json type (hash, array, scalar..).
However, this caused me to run into some trouble since the python "json" library is crippled bordering on useless since it doesn't support several core python data types (notably the python array) when encoding. I've mostly solved these problems, but it's soon to commit.
I guess this might be good to know in case there's a large commit in the pipeline concerning something else.