Repository navigation
fix(server): agents capture pages with Onicode's browser, not a headless Chrome of their own - #359
Merged
Merged
Conversation
…ess Chrome of their own Agents that had the `browser` tools still started a headless shell for screenshots, blocked fetches and delegated checks. Their instructions named only `preview_*`, whose page tools the driver replaces, and the driver could not write a PNG to a file, at a fixed size, or of a whole page. - Instructions: the browser bullets name the `browser` tools first, say what `vision` can write, and forbid a browser of the agent's own for a read or a screenshot. The panel's host note says how to open a local file. - obu 4.9.0: `vision` takes `path`, `size` and `full`, and `run` takes `vision` steps. - Browser panel: a driver's size changes and a desktop tab's captures run one at a time. A desktop tab paints only about one window of a page, so a larger capture is taken as tiles and joined. A capture the page answers too late blocks the next one until the tab's size is put back, and a clear behind it waits for that. A capture too large for the driver's connection is refused with a message. - Evals: `browser-driver` cases replay obu's real tool list with a scripted driver, and a call can be graded on its result. Co-Authored-By: Claude Fable 5.2 <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.
Problem
Agents that had the
browsertools (obu) still started a headless browser of their own for screenshots, blocked fetches and delegated checks. Two causes:preview_*, whose page tools the driver replaces, so nothing told an agent thebrowsertools were its browser.Fix
browsertools first, say whatvisionwrites (path,size,full), and rule out a browser of the agent's own for a read or a screenshot, with the project's own tests, a debug port the task names, and a browser the user names left alone. The panel's host note says how to open a local file (serve it over http).visiontakespath,sizeandfull;runtakesvisionsteps. The pin, sizes and hashes are from the release assets.pngTiles.ts), up to 40 megapixels, which is also where obu cuts a capture.browser-drivercases replay obu's real tool list with a scripted driver, and a call can be graded on its result.Measurements
Real Onicode turns in a dev app (Claude), counted by whether the turn used the driver or started a browser of its own:
Every PNG came back at the size asked for. Haiku is sensitive to the wording of the first browser bullet: a rewording that meant the same took the deck export to 0/4 on the driver, so the bullet keeps the wording that measured best, and the evals README says to re-run that case on Haiku after an edit.
evals/mcp-tool-useon GPT-6.2 Sol:browser-driver(new, 11 cases, 3 samples)browser-routing(3 samples)visual-preview(2 samples)The samples that differ in the last two rows ended at the step limit with no browser call. Each of those cases was run again on both sides:
br-guard-png-to-attach6/6 and 6/6,demo-build-opens-preview-unasked4/4 and 4/4.Runtime transcript
One turn in the dev app on this branch, with obu 4.9.0 downloaded by the pin, the app window visible. Each line is a
visioncall's time and result:The same calls with the window minimized return the same sizes (first capture 3.6 s, the rest under 0.5 s), and at 125% page zoom a full page comes back whole (1280x1918 for a 1534 CSS px page).
Checks
vp run check:changedpasses.apps/server/src/preview,src/browserUse,AgentContextBudget.test.ts, and the eval harness tests.Work done by Claude Fable 5.2 in Claude Code, running in Onicode.
🤖 Generated with Claude Code