From 0c8a4009dc3958a020a7368b3afdaf4350a28e8f Mon Sep 17 00:00:00 2001 From: AI Christianson Date: Wed, 12 Feb 2025 16:58:39 -0500 Subject: [PATCH] fix bug where completion message was wiped too early --- ra_aid/agent_utils.py | 2 -- ra_aid/tools/agent.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ra_aid/agent_utils.py b/ra_aid/agent_utils.py index cdeac25..33f6b9e 100644 --- a/ra_aid/agent_utils.py +++ b/ra_aid/agent_utils.py @@ -809,11 +809,9 @@ def run_agent_with_retry(agent, prompt: str, config: dict) -> Optional[str]: if _global_memory["plan_completed"]: _global_memory["plan_completed"] = False _global_memory["task_completed"] = False - _global_memory["completion_message"] = "" break if _global_memory["task_completed"]: _global_memory["task_completed"] = False - _global_memory["completion_message"] = "" break # Execute test command if configured diff --git a/ra_aid/tools/agent.py b/ra_aid/tools/agent.py index e50099a..f4d814b 100644 --- a/ra_aid/tools/agent.py +++ b/ra_aid/tools/agent.py @@ -275,6 +275,7 @@ def request_task_implementation(task_spec: str) -> Dict[str, Any]: print_task_header(task_spec) # Run implementation agent from ..agent_utils import run_task_implementation_agent + _global_memory["completion_message"] = "" _result = run_task_implementation_agent( base_task=_global_memory.get("base_task", ""), @@ -344,6 +345,7 @@ def request_implementation(task_spec: str) -> Dict[str, Any]: try: # Run planning agent from ..agent_utils import run_planning_agent + _global_memory["completion_message"] = "" _result = run_planning_agent( task_spec,