diff --git a/agent/base_agent.py b/agent/base_agent.py index e5e64b6ed..a0a64c140 100644 --- a/agent/base_agent.py +++ b/agent/base_agent.py @@ -75,6 +75,9 @@ def _filter_code(self, raw_code_block: str) -> str: line for line in raw_code_block.splitlines() if not line.strip().startswith('```') ] + # Sometimes LLM returns a build script containing only comments. + if all(line.strip().startswith('#') for line in filtered_lines): + return '' filtered_code_block = '\n'.join(filtered_lines) return filtered_code_block