Add instruction to verify PR status before pushing#2696
Conversation
Instructs the agent to check if an existing PR is still open before pushing to its branch. If the PR has been closed or merged, the agent should create a new branch and open a new PR instead. Co-authored-by: openhands <openhands@all-hands.dev>
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟡 Acceptable with eval verification needed
This prompt change solves a real problem (agents pushing to closed/merged PR branches) but requires benchmark verification per repo policy. The instruction is clear and pragmatic—just needs confirmation it doesn't cause unintended behavior.
|
Evaluation Triggered
|
🎉 Swebench Evaluation CompleteEvaluation: 📊 Results
🔗 Links |
enyst
left a comment
There was a problem hiding this comment.
Thank you! Yes I've had to specify this, or the agent is pushing blindly.
On a side note, sometimes I wonder if github PRs belong in the system prompt... maybe a question for another day! This makes sense now.
|
37/50 looks OK. |
Adds a new line to the
<PULL_REQUESTS>section of the system prompt instructing the agent to verify that an existing PR is still open before pushing to its branch. If the PR has been closed or merged, the agent should create a new branch and open a new PR instead.This prevents the agent from pushing commits to branches of already-closed/merged PRs.
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22-slimgolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:3715f62-pythonRun
All tags pushed for this build
About Multi-Architecture Support
3715f62-python) is a multi-arch manifest supporting both amd64 and arm643715f62-python-amd64) are also available if needed