princeton-nlp / SWE-agent

SWE-agent takes a GitHub issue and tries to automatically fix it, using GPT-4, or your LM of choice. It solves 12.47% of bugs in the SWE-bench evaluation set and takes just 1 minute to run.
https://princeton-nlp.github.io/SWE-agent/
MIT License
11.9k stars 1.19k forks source link

Certain failed commands break swe-agent returncode capture #630

Open klieret opened 5 days ago

klieret commented 5 days ago

As spotted together with @samuela

INFO     🎬 ACTION (primary)
         python
ERROR    Unknown exception
         Traceback (most recent call last):
           File "/Users/fuchur/Documents/24/git_sync/SWE-agent/sweagent/environment/swe_env.py", line 452, in step
             observation = self.communicate(input=action, timeout_duration=25)
           File "/Users/fuchur/Documents/24/git_sync/SWE-agent/sweagent/environment/swe_env.py", line 733, in communicate
             output = self._communicate(
           File "/Users/fuchur/Documents/24/git_sync/SWE-agent/sweagent/environment/swe_env.py", line 680, in _communicate
             return self._communicate_experimental(input, timeout_duration)
           File "/Users/fuchur/Documents/24/git_sync/SWE-agent/sweagent/environment/swe_env.py", line 667, in _communicate_experimental
             self.returncode = int(exit_code)
         ValueError: invalid literal for int() with base 10: '$?'