Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Fix(run-batch): Avoid 'Too many open files' OSError

Kilian Lieret13001d096f8e
diff --git a/sweagent/run/run_batch.py b/sweagent/run/run_batch.py
index 6bafe088..ed7a68f0 100644
--- a/sweagent/run/run_batch.py
+++ b/sweagent/run/run_batch.py
@@ -287,6 +287,7 @@ class RunBatch:
if self.should_skip(instance):
self._progress_manager.on_instance_end(instance.problem_statement.id, exit_status="skipped")
+ self._remove_instance_log_file_handlers(instance.problem_statement.id)
return
# Either catch and silence exception, or raise _BreakLoop to stop the loop