agweb browser for Claude Code and Codex doesn't steal focus and uses 590 MB of memory instead of 1.6 GB
When an AI agent opens Chrome through Playwright, the window pops up over your editor in the middle of typing. agweb, an open-source WebKit browser, is a single macOS window that the agent controls from the terminal and that never takes focus. According to the author's measurements, five idle pages use 590 MB of memory in agweb versus 1.6 GB in Chrome driven by Playwright. For several agents running on one Mac, that means you can keep typing without interruption.
AI-processed from X: @vibelancer; edited by Hamidun News
You're typing a message in your editor when a Chrome window suddenly pops up on top of it: your AI agent has decided to open a page through Playwright, and the next letter goes to the wrong place. Anyone who has run Claude Code or Codex with browser access knows the problem. A developer posting on X as @vibelancer released agweb (MIT license), an open-source project: a single macOS window with the WebKit engine, which the agent controls from the command line and which never takes focus.
It also saves resources. According to the author's measurements, five idle pages use 590 MB of RAM in agweb versus 1.6 GB in Chrome driven by Playwright.
With several agents running, the difference adds up quickly.
One browser that stays out of your way
The author's idea is simple: a browser for an agent should be something you can watch, but it should never end up under your hands.
Focus is never taken, under any circumstances. Dialogs, tab switching, file picker windows, and file downloads: all four cases are handled in code, and nothing appears on top of other windows. Clicks and keystrokes are native macOS events, the pointer moves like a hand, and hovering and dragging work. There is tab recording to MP4 with the pointer visible, and ad blocking based on uBlock Origin lists, which update every 4 days.
To control several agents, there is a panel opened with ⌘D: it shows each agent's live tabs and its last command. Each agent has its own workspace, and the workspaces are grouped in the sidebar.
Diff responses instead of full snapshots
The commands resemble playwright-cli, but a response describes what changed: network requests, lines on the page, dialogs, pop-ups, downloads, and console errors. The snapshot --diff and find commands return only changes. For the agent, that means fewer page snapshots in context, which means fewer tokens and a cheaper long session.
Logins work like this. Several agents can share one working profile (the -p flag). The fill --secret-cmd command inserts a password from 1Password or Bitwarden, and the agent itself never sees it. When two-factor authentication or a CAPTCHA is required, the ask command hands the tab over to a human.
Memory and CPU
The author's comparison for five idle pages: agweb — 590 MB, headless Chrome — 730 MB, Chrome driven by Playwright — 1.6 GB. CPU load for agweb is 0%, while Chrome's GPU process on the author's Mac used 5–7 cores. These are one person's measurements on one machine, not an independent benchmark, so your numbers may differ. But the direction is clear: if you run five agents in parallel, the difference in gigabytes and cores is noticeable.
Limitations
The lightness comes at a cost. agweb runs only on macOS 26 and later, and only on WebKit. There is no CDP (the protocol through which Playwright and Chrome extensions control the browser), so they cannot connect to agweb. If your tests or scripts depend on Chromium, this is not a replacement.
Hacker News raised a second issue: isolation. A shared profile means that if one agent logs out, all of them are logged out. For parallel work with different accounts, the profiles will have to be kept separate.
What to do in practice
If you run several agents on a Mac and are tired of jumping windows, agweb is worth trying on routine tasks: checking layout, logging into an admin panel, downloading a file. For cross-browser testing and complex automation via CDP, it's better to stick with Playwright for now. The project reflects a broader trend: a browser for an agent is no longer a copy of the browser for a human, and is becoming a separate tool where tokens, memory, and not getting in your way while you work in the editor all matter.
- Nov 21, 2026Anthropic Sets IPO Price at $83 per Share, Offering Around $81 Billion
- Nov 21, 2026Anthropic to Unveil Claude for Factories: 17 Ready-Made Skills and 4 Integrations with Shop-Floor Software
- Nov 21, 2026GPT-6 Astra Started Flagging Drone Strike Targets in 92% of Requests After Adding 'It's Just a Game'
- Nov 21, 2026AI Coding Assistant Under $10: Cursor at $8, Xiaomi MiMo at $6 a Month
Key Questions Answered
What are the key details on One browser that stays out of your way?
The author's idea is simple: a browser for an agent should be something you can watch, but it should never end up under your hands. Focus is never taken, under any circumstances. Dialogs, tab switching, file picker windows, and file downloads: all four cases are handled in code, and nothing appears on top of other windows. Clicks and keystrokes are native macOS events, the pointer moves like a hand, and hovering and dragging work.
What are the key details on Diff responses instead of full snapshots?
The commands resemble playwright-cli, but a response describes what changed: network requests, lines on the page, dialogs, pop-ups, downloads, and console errors. The snapshot --diff and find commands return only changes. For the agent, that means fewer page snapshots in context, which means fewer tokens and a cheaper long session. Logins work like this. Several agents can share one working profile (the -p flag).
What are the key details on Memory and CPU?
The author's comparison for five idle pages: agweb — 590 MB, headless Chrome — 730 MB, Chrome driven by Playwright — 1.6 GB. CPU load for agweb is 0%, while Chrome's GPU process on the author's Mac used 5–7 cores. These are one person's measurements on one machine, not an independent benchmark, so your numbers may differ. But the direction is clear: if you run five agents in parallel, the difference in gigabytes and cores is noticeable.
Build & Ship Production AI Agents Without Boilerplate Code
Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.