I found a similar question here: Windows equivalent for Linux "screen" or another alternative?
The asker is looking for a windows version of the Linux screen command, which I think would be what you are looking for. Unfortunately there doesn't seem to be a native solution but you should read through it and see if it sheds any light on the topic for you.
A workaround using IPC, connect to the process from a new q session using:
q)h:hopen `::5000;
Then pass the command through to get the information you need.
q)h"sum 10 20"
30
Here's a link to the kx IPC cookbook for more info on IPC:
http://code.kx.com/q/cookbook/ipc/
Hopefully some of this is useful to you.