Honor snapshotMode on error paths and cap response size (12,449-char error payload)
The problem
With snapshotMode set to "none" on every call, a FAILED browser_click returned 12,449 characters: one line of error plus the entire accessibility tree. The successful click_ref on that same element returned 208 characters. browser_get_state with the compact mode returned 12,476 characters on the same page.
Over a 5-task suite this added up to about 53,000 characters of response where another driver used about 2,200 for the same answers — roughly 24x. Failures were the most expensive calls in the API, which is backwards: the moment an agent is retrying is the moment you least want to dump the whole tree.
Ask:
1. snapshotMode:"none" means no snapshot on success AND on error paths. Put snapshot behind an explicit includeSnapshot:true.
2. A maxChars / response budget with an explicit truncation notice, so an agent can cap the cost of a call.
3. A delta option: only the nodes that changed since the previous snapshot.
4. Errors first: reason, target, and observed url on the first lines; detail last.
Easy repro: open https://news.ycombinator.com/ , call browser_click with selector "a.morelink" and snapshotMode "none". Note the response size, then call browser_click_ref on the same link and compare.
Roadmap progress
SHIPPED · 1.10.0PENDING
REVIEWING
—
PLANNED
—
IN PROGRESS
COMPLETED
- — Khang Nguyen submitted this request
- — Khoa - StoicSoft Team moved it to In progress
- — Khoa - StoicSoft Team moved it to Completed
Discussion0
Newest first- No comments yet. Add context or ask a question below.
Sign in to comment, vote and follow this request.
Sign in to reply