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: correct inverted logic in blocklist check (#1336)

thecaptain789c69d6f56c786
diff --git a/sweagent/tools/tools.py b/sweagent/tools/tools.py
index 02ffc8a5..13047c56 100644
--- a/sweagent/tools/tools.py
+++ b/sweagent/tools/tools.py
@@ -355,7 +355,7 @@ class ToolHandler:
action = action.strip()
if not action:
return False
- if any(f.startswith(action) for f in self.config.filter.blocklist):
+ if any(action.startswith(f) for f in self.config.filter.blocklist):
return True
if action in self.config.filter.blocklist_standalone:
return True