      (let [context          (env/precondition-context f state)
            state-in-context (env/extract-context state context)
            sub-name         [state-in-context (env/action-name f)]
-           sup-name         [state-in-context (map env/action-name remaining-actions)]
-           sp               (make-search-in-context 
-                             (get-cached-search sub-name 
-                               (make-incremental-dijkstra-search
-                                (make-initial-sp-nodes (env/get-logger state context) f)))
-                              state reward)]
-       (SPRecursiveNode sup-name sp r))
+           sup-name         [state-in-context (map env/action-name remaining-actions)]]
+       (SPRecursiveNode sup-name
+         (delay 
+          (make-search-in-context 
+           (get-cached-search sub-name 
+             (make-incremental-dijkstra-search
+              (make-initial-sp-nodes (env/get-logger state context) f)))
+           state reward))
+         r))
      (GoalNode state))
    reward])
 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Cached Search ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; TODO: split refine into PartialResult type, always give new reward -- more accurate.
;; TODO: 

(defn make-cached-search-factory
  "Return a cache-fn, where (cache-fn) returns fresh IncrementalSearch views on

 ; bottom-up: give me updates as you get them, only of particular form. 
 ; For now, fix this, then extend. 

; We should still (unfortunately) never close open subproblems with cycles.  



(defn viable? [reward cutoff]
