diff --git a/src/executor.py b/src/executor.py
index 0080ea3687c93ff1e86f1f635fce92abce2963b6..6a3611c639f8bb8a0e7734b5448187782cbf258f 100644
--- a/src/executor.py
+++ b/src/executor.py
@@ -27,6 +27,8 @@ class Executor(Nextflow_Building_Blocks):
     #---------------------------------
     #AUXILIARY METHODS FOR ALL CLASSES
     #---------------------------------
+    def get_cycle_status(self):
+        return self.origin.get_cycle_status()
 
     def get_list_name_processes(self):
         return self.origin.get_list_name_processes()
diff --git a/src/main.py b/src/main.py
index 0a72807194c53f3e179b881bb37f2e19b47461d8..5bfec9981aa3df1a741fccb6bc4fd403ab31b8db 100644
--- a/src/main.py
+++ b/src/main.py
@@ -15,6 +15,10 @@ class Main(Nextflow_Building_Blocks):
         self.initialised = False
         self.root = None 
 
+
+    def get_cycle_status(self):
+        return self.nextflow_file.get_cycle_status()
+    
     def get_order_execution_executors(self, dico, seen):
         executors = self.get_all_executors_in_subworkflow()
         pos = {}
diff --git a/src/nextflow_file.py b/src/nextflow_file.py
index 4a16634dfbca9900674ef6bf35d7c18c5a41141f..14c6fa22cc8faebe05209ba6764be58bc38fb5fe 100644
--- a/src/nextflow_file.py
+++ b/src/nextflow_file.py
@@ -37,6 +37,9 @@ class Nextflow_File(Nextflow_Building_Blocks):
     #GENERAL
     #----------------------
 
+    def get_cycle_status(self):
+        return self.workflow.get_cycle_status()
+
     def add_to_ternary_operation_dico(self, old, new):
         self.workflow.add_to_ternary_operation_dico(old, new)
     
diff --git a/src/operation.py b/src/operation.py
index ffb881660da5a0a1c4116bc5eb1723ef12dee712..d8933aac432f70cb80489967e04bd1ca9990c0cb 100644
--- a/src/operation.py
+++ b/src/operation.py
@@ -189,6 +189,8 @@ class Operation(Executor):
                         emitted.add_sink(self)
                         self.origins.append(emitted)
                 else:
+                    if(self.get_cycle_status()):
+                        raise BioFlowInsightError(f"A cycle (inderect or direct) exists in the workflow. The rewrite could not be done with the proprosed relavant processes. Either correct the defintion of the workflow or give another set of relevant processes.", type="Cycle exists in workflow")
                     if(name_called[:5]=="Call_"):
                         name_called = self.calls[name_called].get_code()
                     raise BioFlowInsightError(f"The call for '{name_called}' coudn't be found, before its use in the operation '{self.get_code(get_OG=True)}'{self.get_string_line(self.get_code(get_OG=True))}. Either because the call wasn't made before the operation or that the element it is calling doesn't exist.", type =8, origin=self)
diff --git a/src/root.py b/src/root.py
index 004e0d6a55b5e76a7cdc3c45bd85499150472ee7..2904c4b8ad4bb73a4fc6f737527562b5fd903ed0 100644
--- a/src/root.py
+++ b/src/root.py
@@ -27,6 +27,9 @@ class Root(Nextflow_Building_Blocks):
     def get_type(self):
         return "Root"
     
+    def get_cycle_status(self):
+        return self.origin.get_cycle_status()
+    
     def get_position_in_main(self, executor):
         return self.origin.get_position_in_main(executor)
     
diff --git a/src/workflow.py b/src/workflow.py
index 8bbd39a4bc57cdfcce8872969305c96df3ad92e5..8df04afb85a6dbfaa38556c2ed191abaa26cec97 100644
--- a/src/workflow.py
+++ b/src/workflow.py
@@ -87,6 +87,7 @@ class Workflow:
         self.create_empty_results()
         if(self.display_info):
             print(f"Workflow is written in {self.DSL}")
+        self.cycle_in_workflow = False
         
 
     def create_empty_results(self):
@@ -101,6 +102,9 @@ class Workflow:
         with open(self.output_dir / "debug" / "operations_in_call.nf",'w') as file:
             pass
 
+    def get_cycle_status(self):
+        return self.cycle_in_workflow 
+    
     def get_root_directory(self):
         first_file = self.get_first_file()
         return '/'.join(str(first_file.get_file_address()).split('/')[:-1])+"/"
@@ -600,6 +604,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
         return min_relevant_processes
 
     #TODO -> add excpetion Channel exists in multiple forms -> check with 132
+    #Cycle exists in workflow too -> 667
     def get_relevant_following_best_general_score(self, 
                                                   reduction_alpha = 0.2, 
                                                   reduction_beta = 0.8, 
@@ -834,7 +839,9 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
         f.close()
 
         #Replace old analysis with new analysis (simplified code)
+        temp = self.get_cycle_status()
         self.__init__(str(temp_file), display_info = False, duplicate=True, processes_2_remove=processes_2_remove)
+        self.cycle_in_workflow = temp
         self.initialise()
         os.remove(temp_file)
         self.graph.initialise(processes_2_remove = self.processes_2_remove)
@@ -1084,6 +1091,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
             #    raise BioFlowInsightError("An indirect cycle was detected in the workflow. This happens often when a same channel is used multiple times in the workflow. This is a norm that we do not recommend. Try rewritting the workflow in a different way. See [link] for more details", type="Cycle detected")
             edges_create_cycles_objects = []
             for e in edges_create_cycles:
+                self.cycle_in_workflow = True
                 edges_create_cycles_objects.append((get_object(e[0]), get_object(e[1])))
             for e in edges_create_cycles_objects:
                 n1 = e[0].get_alias()