Run a single task through the agentic loop. Args: task: The user's task description. plan_mode: If True, runs structured plan mode: Phase 1: Decompose into subtasks (task tools only) Phase 2: Generate YAML plan for each subtask
(self, task: str, plan_mode: bool = False)
| 156 | self._verifier: Optional[PlanVerifier] = None |
| 157 | |
| 158 | def run(self, task: str, plan_mode: bool = False) -> str: |
| 159 | """Run a single task through the agentic loop. |
| 160 | |
| 161 | Args: |
| 162 | task: The user's task description. |
| 163 | plan_mode: If True, runs structured plan mode: |
| 164 | Phase 1: Decompose into subtasks (task tools only) |
| 165 | Phase 2: Generate YAML plan for each subtask |
| 166 | No execution — plans are generated and verified only. |
| 167 | """ |
| 168 | self._setup() |
| 169 | if plan_mode: |
| 170 | result = self._run_plan_mode(task) |
| 171 | else: |
| 172 | self.session.add_user_message(task) |
| 173 | result = self._inner_loop() |
| 174 | self.logger.event("loop_end", self.session.get_usage_summary()) |
| 175 | return result |
| 176 | |
| 177 | def run_interactive(self) -> None: |
| 178 | """Interactive REPL mode. Reads tasks from stdin. |
no test coverage detected