feat(prompts): add retry/loop-breaking rules to bu-flash system prompt#41
Draft
caffeinum wants to merge 1 commit into
Draft
feat(prompts): add retry/loop-breaking rules to bu-flash system prompt#41caffeinum wants to merge 1 commit into
caffeinum wants to merge 1 commit into
Conversation
The browser-use provider auto-flips flash_mode (service.ts:599), which selects the 15-line minimal prompt. That prompt lacked any guidance for loop avoidance, retry strategy, or autocomplete handling — gaps the fine-tuned bu-2-0 model was supposed to internalize but doesn't always. Append a short <retry_strategy> block (5 generic rules, no URL or provider matching) covering: same-action-3x, stuck-URL, dead clicks, autocomplete value mismatch, and missing credentials. Keeps the prompt small (15 -> 23 lines) without re-inflating to the full 269-line variant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an 8-line
<retry_strategy>block tosystem_prompt_browser_use_flash.md. The rules are a condensation of guidance that already exists in the mainsystem_prompt.mdbut was stripped from the slim flash variants on the assumption that the bu-2-0 fine-tune would internalize it. In production we've observed bu-2-0 looping — re-emitting the same failing action 3+ times without changing approach — particularly on auth/MFA flows.Added rules (paraphrased)
Cross-reference with upstream main prompt
Equivalent guidance already exists in upstream
system_prompt.md:So this isn't fork-specific tuning — it's restoring upstream's own guidance into the slim flash variant where it was dropped.
Test plan
pnpm test:unit)Note
system_prompt_flash.md(the non-browser-use flash prompt) has the same gap. Out of scope for this PR; happy to follow up if maintainers want.🤖 Generated with Claude Code