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: Disable highlighting of model outputs (#949)

Kilian Lieret5455eb18642a
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index b27f2c61..3d9f3e0c 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -638,7 +638,9 @@ class DefaultAgent(AbstractAgent):
message = "\n".join(messages)
- self.logger.info(f"🤖 MODEL INPUT\n{message}")
+ # We disable syntax highlighting here, because some inputs can lead to a complete cross-thread
+ # freeze in the agent. See https://github.com/SWE-agent/SWE-agent/issues/901 .
+ self.logger.info(f"🤖 MODEL INPUT\n{message}", extra={"highlighter": None})
history_item: dict[str, Any] = {
"role": "user",
"content": message,