Implement the shell ping/pong mechanism