   (or (@repository-agents-atom repository-url)
       ((swap! repository-agents-atom 
               (fn [repository-agents repository-url]
-                (conj repository-agents 
-                      {repository-url
-                       (agent {:repository-url repository-url
-                               :repository-path (canonical-repository-path repository-url) } 
-                              :error-mode :continue)}))
+                (if (repository-agents repository-url)
+                  repository-agents
+                  (conj repository-agents 
+                        {repository-url
+                         (agent {:repository-url repository-url
+                                 :repository-path (canonical-repository-path repository-url) } 
+                                :error-mode :continue)})))
               repository-url) 
        repository-url)))
 

    ))


(defn- canonical-repository-path [repository-url]
  (str (:git_repos_dir (get-config)) (File/separator) 
       (ci-fs/path-proof repository-url)))

;### Agents ###################################################################


;### Core Git #################################################################

(defn- create-mirror-clone [url path] 
  (system/exec ["rm" "-rf" path])
  (system/exec-with-success-or-throw
    ["git" "clone" "--mirror" url path] 
    {:add-env {"GIT_SSL_NO_VERIFY" "1"}
