Merge pull request #567 from 3927o/feature/better-fallback-message

Add max iterations info to fallback message
This commit is contained in:
Xubin Ren 2026-02-13 12:55:14 +08:00 committed by GitHub
commit 5c398c5faf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -256,7 +256,10 @@ class AgentLoop:
break
if final_content is None:
final_content = "I've completed processing but have no response to give."
if iteration >= self.max_iterations:
final_content = f"Reached {self.max_iterations} iterations without completion."
else:
final_content = "I've completed processing but have no response to give."
# Log response preview
preview = final_content[:120] + "..." if len(final_content) > 120 else final_content