Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Agent tends to use browser instead of GitHub API to open pull requests #6655

Open
1 task done
zchn opened this issue Feb 7, 2025 · 8 comments
Open
1 task done
Labels
bug Something isn't working microagents Related to microagents

Comments

@zchn
Copy link
Contributor

zchn commented Feb 7, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Despite having the github microagent in https://github.com/All-Hands-AI/OpenHands/blob/main/microagents/knowledge/github.md, I frequently run into cases where the agent tries to use the browser to open a new PR (and fails) instead of the preferred way of using GitHub API. Here is the most recent example:

https://www.all-hands.dev/share?share_id=883b5c047dcbb2df36e1b1c65f7676f25c282bf28a1bc6c896e5f69b2cfc1f56 where

  1. I did mention GitHub in my prompt (screenshot 1),
  2. but openhands still tries the browser first (screenshot 2),
  3. and I have to tell openhands to use the GitHub API after it fails to use the browser to submit a PR (screenshot 3).
Image Image Image

OpenHands Installation

Development workflow

OpenHands Version

main

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

https://www.all-hands.dev/share?share_id=883b5c047dcbb2df36e1b1c65f7676f25c282bf28a1bc6c896e5f69b2cfc1f56

@zchn zchn added the bug Something isn't working label Feb 7, 2025
@enyst
Copy link
Collaborator

enyst commented Feb 7, 2025

Thank you for the report! Was this LLM Claude Sonnet?

@zchn
Copy link
Contributor Author

zchn commented Feb 7, 2025 via email

@zchn
Copy link
Contributor Author

zchn commented Feb 7, 2025

(realized I did not upload the screenshots properly so just added them to the original post)

@enyst
Copy link
Collaborator

enyst commented Feb 7, 2025

I wonder, the id of the action was 95, that might be relatively much for Sonnet to remember every detail from the beginning? Idk, in any case appreciate the report.

@mamoodi
Copy link
Collaborator

mamoodi commented Feb 8, 2025

There were two other issues related to this bug I'm having a hard time finding them. It was also not using the github API when it should be.

@enyst
Copy link
Collaborator

enyst commented Feb 8, 2025

There's a note here, but that was not really the same, because it was with the resolver: some initial prompts are different. The github microagent in particular is not enabled with the resolver, and instead it has prompting of its own.

@mamoodi
Copy link
Collaborator

mamoodi commented Feb 9, 2025

Found it. Here is it:
#5634

@h55nick
Copy link

h55nick commented Feb 10, 2025

Can this be resolved by expanding the "triggers" in the microagent and then cleaning up the github prompt? This thought process doesn't seem baked into the system itself but more a prompting update.

@mamoodi mamoodi added the microagents Related to microagents label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working microagents Related to microagents
Projects
None yet
Development

No branches or pull requests

4 participants