From bc88d1132ea884aa09a8e9ba2afa05153c32e05e Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 3 Jun 2026 17:03:59 +0000 Subject: [PATCH] feat(coop): optional "trust your teammate" prompt emphasis (openhands) Add an env-gated experiment knob, CB_COOP_TRUST_EMPHASIS. When set, the openhands coop collaboration system prompt gains a Trust block telling the agent to take the teammate's stated promises at face value: build against what they promised, and don't re-implement, second-guess, or duplicate their part. Off by default, so the baseline coop prompt is unchanged. On the flash set (coop+git, gemini-3-flash) this lifted pass rate to 32% (16/50) from the 20% baseline, mainly by cutting merge conflicts (18 -> 11) as agents stopped redoing each other's work. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../openhands/tools/preset/default.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/cooperbench/agents/openhands_agent_sdk/openhands-tools/openhands/tools/preset/default.py b/src/cooperbench/agents/openhands_agent_sdk/openhands-tools/openhands/tools/preset/default.py index e422b0c0..0a51398e 100644 --- a/src/cooperbench/agents/openhands_agent_sdk/openhands-tools/openhands/tools/preset/default.py +++ b/src/cooperbench/agents/openhands_agent_sdk/openhands-tools/openhands/tools/preset/default.py @@ -1,5 +1,7 @@ """Default preset configuration for OpenHands agents.""" +import os + from openhands.sdk import Agent from openhands.sdk.context.condenser import ( LLMSummarizingCondenser, @@ -116,6 +118,20 @@ def get_coop_system_prompt(agent_id: str, teammates: list[str], messaging_enable * Push: `git push team {agent_id}` * Fetch: `git fetch team` """ + # Experiment knob: when CB_COOP_TRUST_EMPHASIS is set, add a strong + # instruction to trust the teammate's stated promises (rather than + # re-verifying or defensively duplicating their work). Off by default + # so the baseline coop prompt is unchanged. + if os.environ.get("CB_COOP_TRUST_EMPHASIS"): + collab_section += ( + "\n## Trust\n" + "YOU SHOULD TRY TO TRUST YOUR TEAMMATE REGARDING WHAT THEY PROMISED. " + f"When {teammate_name} tells you which files/functions they will handle or how an " + "interface will behave, take them at their word: build against what they promised, " + "do not re-implement or second-guess their part, and do not duplicate their changes. " + "Coordinate through messages and rely on their commitments.\n" + ) + collab_section += """ """