Make things a bit less gross by cloning the client for stdin discovery