Repository navigation
browser: give stopped runs a final writer answer - #41
Open
charan-rathore wants to merge 3 commits into
Open
charan-rathore wants to merge 3 commits into
charan-rathore wants to merge 3 commits into
Conversation
charan-rathore
marked this pull request as ready for review
September 28, 2026 06:29
Contributor
Author
|
Hi, this is ready for review. The current checks are green. Happy to make any changes you need. Thanks! |
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
Fixes #17. Builds on merged #23, which gave the browser loop visible page text. The browser loop currently stops on
done,none, low confidence, a stall, or the step limit without returning a useful answer. This change gives the stopped run to the writer, with the final page's URL, title, plain visible text, controls, and action history. The writer returns an answer, may ask the user a bounded question, or may give a focus that sends the classifier back to work. The classifier still picks every action.The answer, achievement flag, and handoff count are saved to
run.json.clicker-bench browserprints the answer. A disabled or failed writer ends with a clear "no answer" instead of crashing. Optional screenshot capture only runs when writer vision is enabled.Why this builds on #23
#23 added visible page text to the browser observation. Its final shape is a list of plain strings, not evidence IDs. This change passes those strings to the writer, so it can answer a question whose evidence is in page copy rather than a clickable control. No clickable target is created from text.
Checks
uv run --no-sync ruff check .: passed.uv run --no-sync ruff format --check .: passed.uv run --no-sync pytest -q: 618 passed, 3 skipped, 1 xfailed on Linux.Caveat
The full macOS CI and a live provider/browser run have not yet been verified, so this PR is a draft. The tests check the handoff with fakes at the browser and writer boundaries.
Instinct assisted.