                         ns)))
           options (if (:color options)
                     (merge options nrepl.cmdline/colored-output)
-                    options)
-          session-sender (nrepl/client-session client :session session)
-          responses (session-sender {:op :eval :code ""})]
-      (future
-        (doseq [{:keys [out err] :as resp} responses]
-          (when err (print err))
-          (when out (print out))
-          (flush)))
+                    options)]
+      (.start (Thread.
+        (fn []
+          (when-let [{:keys [out err] :as resp}
+                  (nrepl.transport/recv connection 100)]
+            (when err (print err))
+            (when out (print out))
+            (when-not (or err out)
+              (.offer (@response-queues (:session resp)) resp))
+            (flush))
+          (recur))))
       (execute-with-client
                client
                (assoc options :value (constantly nil))

  (let [connection         (get-connection options)
        client             (nrepl/client connection Long/MAX_VALUE)
        session            (nrepl/new-session client)
        completion-session (nrepl/new-session client) ]
    (reset! current-session session)
    (let [options (assoc options :prompt
                    (fn [ns]
                      (reader.jline/prepare-for-read

(ns reply.eval-modes.nrepl
  (:import [java.util.concurrent ConcurrentLinkedQueue])
  (:require [clojure.tools.nrepl.cmdline :as nrepl.cmdline]
            [clojure.tools.nrepl :as nrepl]
            [clojure.tools.nrepl.misc :as nrepl.misc]
