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: Retrieve extra info from BashIncorrectSyntaxError

Kilian Lieret1e6b0b893372
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index 71e0e877..c51d552f 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -587,6 +587,7 @@ class Agent:
return self.get_model_requery_history(
error_template=template,
**step.model_dump(),
+ **getattr(exception, "extra_info", {}),
)
n_fails = 0
@@ -611,7 +612,10 @@ class Agent:
)
except BashIncorrectSyntaxError as e:
n_fails += 1
- history = handle_error_with_retry(exception=e, template=self.templates.shell_check_error_template)
+ history = handle_error_with_retry(
+ exception=e,
+ template=self.templates.shell_check_error_template,
+ )
# Errors that cause exit