[Bug]: Agent tends to use browser instead of GitHub API to open pull requests
Is there an existing issue for the same bug?
- [x] 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
- I did mention GitHub in my prompt (screenshot 1),
- but openhands still tries the browser first (screenshot 2),
- and I have to tell openhands to use the GitHub API after it fails to use the browser to submit a PR (screenshot 3).
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
Thank you for the report! Was this LLM Claude Sonnet?
Yes Claude sonnet 3.5
(realized I did not upload the screenshots properly so just added them to the original post)
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.
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.
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.
Found it. Here is it: https://github.com/All-Hands-AI/OpenHands/issues/5634
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.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Is this still happening? I haven't seen it for a while, and I do think the updates to microagents may have been why.
I think we can close this issue for now and reopen if people see it happening again. not seeing any +1's from this report so far.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for over 30 days with no activity.