Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Update summary_prompt for improved code quality (#8975)

Graham Neubig46c12ce2586c
diff --git a/openhands/integrations/templates/resolver/summary_prompt.j2 b/openhands/integrations/templates/resolver/summary_prompt.j2
index 48f3b9b41b..c4c6d99e8d 100644
--- a/openhands/integrations/templates/resolver/summary_prompt.j2
+++ b/openhands/integrations/templates/resolver/summary_prompt.j2
@@ -1,5 +1,8 @@
-Please summarize your work.
+Please send a final message summarizing your work.
-If you answered a question, please re-state the answer to the question
-If you made changes, please create a concise overview on whether the request has been addressed successfully or if there are were issues with the attempt.
-If successful, make sure your changes are pushed to the remote branch.
+If you simply answered a question, this final message should re-state the answer to the question.
+
+If you made changes, please first double-check the git diff, think carefully about the user's request(s), and check:
+1. whether the request has been completely addressed and all of the instructions have been followed faithfully (in checklist format if appropriate).
+2. whether the changes are concise (if there are any extraneous changes not important to addressing the user's request they should be reverted).
+If the request has been addressed and the changes are concise, then push your changes to the remote branch and send a final message summarizing the changes.