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: Use reset commands from repo config
Kilian Lieret39c0df103c6d
diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.pyindex f328211e..b06e610a 100644--- a/sweagent/environment/swe_env.py+++ b/sweagent/environment/swe_env.py@@ -155,10 +155,7 @@ class SWEEnv:startup_commands = [f"cd /{self.repo.repo_name}","export ROOT=$(pwd -P)",- "git status",- "git fetch",- f"git checkout {self.repo.base_commit}",- "git clean -fdq",+ *self.repo.get_reset_commands(),]self.communicate(input=" && ".join(startup_commands),