diff --git a/featurebench/infer/agents/mini_swe_agent.py b/featurebench/infer/agents/mini_swe_agent.py index 251f8b0..945d17f 100644 --- a/featurebench/infer/agents/mini_swe_agent.py +++ b/featurebench/infer/agents/mini_swe_agent.py @@ -109,6 +109,14 @@ def post_run_hook(self, container, log_file) -> bool: ) except Exception: pass + try: + self.cm.copy_from_container( + container, + "/root/.config/mini-swe-agent/last_mini_run.traj.json", + log_dir / "traj.json", + ) + except Exception: + pass return True def failure_hook(self, container, log_file: Path) -> None: @@ -122,6 +130,14 @@ def failure_hook(self, container, log_file: Path) -> None: ) except Exception: pass + try: + self.cm.copy_from_container( + container, + "/root/.config/mini-swe-agent/last_mini_run.traj.json", + log_dir / "traj.json", + ) + except Exception: + pass def get_run_command(self, instruction: str) -> str: """Get the command to run mini-swe-agent."""