Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions openhands/resolver/resolve_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,18 @@ async def on_event(evt):
comment_success = None
success_explanation = 'Agent failed to run'
last_error = 'Agent failed to run or crashed'
# Include error message in success_explanation for visibility
success_explanation = f"{success_explanation}\nError: {last_error}"
else:
histories = [dataclasses.asdict(event) for event in state.history]
metrics = state.metrics.get() if state.metrics else None
# determine success based on the history and the issue description
success, comment_success, success_explanation = issue_handler.guess_success(
issue, state.history, llm_config
)
# If there was an error during execution, append it to the explanation
if state.last_error:
success_explanation = f"{success_explanation}\nError: {state.last_error}"

if issue_handler.issue_type == 'pr' and comment_success:
success_log = 'I have updated the PR and resolved some of the issues that were cited in the pull request review. Specifically, I identified the following revision requests, and all the ones that I think I successfully resolved are checked off. All the unchecked ones I was not able to resolve, so manual intervention may be required:\n'
Expand Down