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]

Only need to check buffer if something was added

Kilian Lieret836653ccec80
diff --git a/sweagent/environment/utils.py b/sweagent/environment/utils.py
index e14169ad..6a9ad4f6 100644
--- a/sweagent/environment/utils.py
+++ b/sweagent/environment/utils.py
@@ -226,8 +226,8 @@ def read_with_timeout_experimental(container: subprocess.Popen, timeout_duration
break
if data:
buffer += data
- if PROCESS_DONE_MARKER_START in buffer.decode():
- break
+ if PROCESS_DONE_MARKER_START in buffer.decode():
+ break
time.sleep(0.01) # Prevents CPU hogging
if container.poll() is not None: