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: don't quote bash command (part of rolling back changes)

Kilian Lieretc39b07359d04
diff --git a/sweagent/tools/tools.py b/sweagent/tools/tools.py
index 335969e6..09fa8575 100644
--- a/sweagent/tools/tools.py
+++ b/sweagent/tools/tools.py
@@ -209,7 +209,7 @@ class ToolHandler:
)
async def _is_command_available(self, env, command: str, env_vars: dict[str, str]) -> None:
- if command == "execute_bash":
+ if command == "bash":
return
try:
await env.deployment.runtime.execute(
diff --git a/sweagent/tools/utils.py b/sweagent/tools/utils.py
index 9dc96daa..4e90e898 100644
--- a/sweagent/tools/utils.py
+++ b/sweagent/tools/utils.py
@@ -38,7 +38,7 @@ def _guard_multiline_input(action: str, match_fct: Callable[[str], re.Match | No
def _should_quote(value: Any, command: Command) -> bool:
"""Returns True if the value should be quoted, False otherwise."""
- if command.name == "execute_bash":
+ if command.name == "bash":
return False
return isinstance(value, str) and command.end_name is None