We made Playwright 2x faster and 80% more token efficient
wittydeveloper
78 points
20 comments
September 18, 2026
Related Discussions
Found 5 related stories in 159.2ms across 7,105 title embeddings via pgvector HNSW
- Show HN: OTP Inspired actor supervisor based full stack templates annrap1d · 11 pts · July 20, 2026 · 49% similar
- Show HN: Libretto PR agents – Automatically fix failing playwright scripts muchael · 18 pts · July 16, 2026 · 48% similar
- Code mode yields a 99.2% cost reduction in our systems tarasyarema · 61 pts · July 23, 2026 · 44% similar
- How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Faster herrington_d · 85 pts · July 26, 2026 · 43% similar
- Show HN: Browser Tools SDK – an optimal browser harness for agents tanishqkanc · 11 pts · July 21, 2026 · 43% similar
Discussion Highlights (11 comments)
wittydeveloper
We built Stagehand 2 years ago (24k stars and 4M monthly npm downloads) and recently fixed its biggest flaw: round-trip latency. Every action performed requires a round trip between your script and the browser (short when running locally but increased when running in the cloud). We also saw multiple posts complaining about the eager token appetite of Playwright MCP. For this reason, we rebuilt Stagehand from the ground up and shipped v4, where Stagehand controls the browser from an extension automatically loaded upon your browser startup. Stagehand v4 comes with batch command support, dedicated token-efficient methods `act()` and `extract()`, and a brand new architecture making it 2x faster than Playwright and 80% more token efficient. You can see for yourself by looking at our benchmarks, comparing its performance across a dozen models (frontier and open weights) and tools (Codex, Claude Code, and more): https://www.stagehand.dev/evals Ask me anything!
cl685
what did you lose compared to CDP (e.g. cross-origin iframes, downloads running in envs where you can't load extensions)?
cl685
lowk why not just do astra computer use
alyssamaru
How much does the harness really matter for evals?
vishalanton
So for an enterprise with a 1,000 test Playwright suite, does this basically mean ~2x faster CI times? That would be huge.
dot_louis
Do I need to pay for Browserbase to use this?
ishankunam
seems really cool! although, one question i have is why not keep agent() alongside the new primatives? it seems v4 removed agent() entirely rather than offering it with all of act(), observe(), extract().
bensyverson
If your needs are simpler, I created a tiny headless WebKit browser specifically for agents called Sleepy Hollow [0] [0]: https://github.com/bensyverson/sleepyhollow
shashanoid
no matter how much faster you make.. playwright is playwright. Dead bot giveaway.
ulrikrasmussen
Looks very useful, and I like the caching idea which I think makes it interesting for self-healing CI tests. How does it determine when a cached act() fails and has to be re-evaluated by the LLM? And in particular, if the cache is saved in the cloud (Browserbase?), won't this lead to a lot of cache churn if used in CI pipelines where different versions of the site are running against the same cache? Also, is there a technical reason why the cache couldn't just be a local file that's checked in along with the script but must be provided by Browserbase? If it was, devs could heal failing tests locally using LLM calls, while CI runs entirely deterministically.
tengkahwee
Would you recommend to use this over agent-browser for general agent-based validation work? Any performance benefit?