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]

fixed broken stuff after merge

Talor Abramovichdac7ea78f2c6
diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.py
index 21d48169..2f33e320 100644
--- a/sweagent/environment/swe_env.py
+++ b/sweagent/environment/swe_env.py
@@ -875,6 +875,10 @@ class SWEEnv(gym.Env):
Returns:
output: output from container
"""
+ if self.challenge is not None and input.startswith("git"):
+ msg = "Skipping git commands for CTF challenges"
+ self.logger.debug(msg)
+ return msg
logs = self.communicate(input, timeout_duration=timeout_duration)
if self.returncode != 0:
self.logger.error(f"{error_msg}: {logs}")