AI

agent-browser on Linux: Install and Drive It from Claude Code

agent-browser gives your coding agent a real Chrome it can drive from the shell. You type short commands such as click @e11, and the agent does the same, without a pile of browser tool schemas in its context. By the end of this guide you’ll have it installed on Linux, passing its own health check, filling a form by hand, and wired into Claude Code as both a skill and an MCP server, with Codex set up the same way.

Original content from computingforgeeks.com - post 190326

You’ll also see how it measured against Playwright MCP on the same local page, the Ubuntu sandbox error that stops Chrome on a fresh install, and one action policy setting that doesn’t do what the docs suggest. I ran every step on Ubuntu 26.04 and Fedora 45 with agent-browser 0.43.0 in November 2026, and they still hold.

Understand what agent-browser installs

agent-browser is a native Rust CLI from Vercel Labs. The npm package is only a wrapper: what you actually run is a single 20 MB binary (agent-browser-linux-x64), and on first use it starts a small background daemon that holds Chrome open over the DevTools protocol. Each command you type talks to that daemon, which is why a click returns in a few dozen milliseconds once the browser is up.

The part that makes it agent friendly is the snapshot. Instead of HTML or a screenshot, snapshot -i prints the page’s accessibility tree with a short ref on every control, so the agent reads button "Create ticket" [ref=e11] and answers with click @e11. There are three pieces to keep apart while you set it up:

  • You get the CLI and its daemon from npm, and they’re all you need to drive a page by hand.
  • You get Chrome for Testing, plus the system libraries it needs, from agent-browser install --with-deps.
  • You connect your agent either with the skill (npx skills add) or with the built-in MCP server (agent-browser mcp), and you can pick one or use both.

You don’t have to decide between the skill and MCP before you start. Both run the same binary, so install first and choose once you’ve seen what each one puts in front of the model.

Install agent-browser on Ubuntu and Fedora

agent-browser installs through npm, so you need Node.js first. The distro packages are new enough on both systems, which means you can skip NodeSource and nvm entirely. Install Node and npm, then confirm the versions:

sudo apt-get install -y nodejs npm
node --version; npm --version

Ubuntu ships Node 22 in the archive, and the version check comes back as:

v22.22.1
9.2.0

On Ubuntu the npm package drags in a long list of node-* debs, so that step takes a few minutes on a fresh machine. It’s normal, and it only happens once.

Next, point npm’s global prefix at your home directory. That keeps npm install -g away from sudo, and it matters later because agent-browser stores Chrome under your home too, so everything lives in one place you own:

npm config set prefix ~/.npm-global
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Now install agent-browser itself and check which binary your shell finds:

npm install -g agent-browser
agent-browser --version
which agent-browser

The install took 9 seconds on Fedora and 2 on Ubuntu, and both machines ended up with the same 20,460,232 byte binary:

agent-browser 0.43.0
/home/lorna/.npm-global/bin/agent-browser

If you see command not found here, your current shell hasn’t picked up the new PATH yet. Open a new terminal or run the source ~/.bashrc line again.

Pull in Chrome and its libraries with –with-deps

The CLI doesn’t bundle a browser. agent-browser install downloads Chrome for Testing into ~/.agent-browser/browsers/, and the --with-deps flag first installs the shared libraries Chrome needs through your package manager. It calls sudo on its own, so expect a password prompt:

agent-browser install --with-deps

On Fedora it ran one dnf install with the GTK, NSS, X11 and font packages, then fetched the 194 MB Chrome archive. You can see both stages in the run from my Fedora machine, trimmed to the parts worth reading:

npm install -g agent-browser and agent-browser install --with-deps pulling 220 dnf packages and Chrome for Testing on Fedora 45

The same command does a very different amount of work on each distro, and that’s worth knowing before you run it on a laptop with limited disk. A Fedora Cloud image has almost no desktop libraries, so dnf pulled in a big slice of GTK and PipeWire, while Ubuntu’s apt run only needed a short list:

What –with-deps didUbuntu 26.04 (apt)Fedora 45 (dnf)
Packages installed37220
Download86.2 MB183 MiB
Extra disk used164 MB619 MiB
Chrome for Testing194 MB zip194 MB zip
Wall time, whole command24.9 s1 min 10.9 s

On a Fedora Workstation desktop most of those 220 packages are already there, so you’ll see a much shorter list. The Ubuntu machine also ran apt-get update first, which --with-deps does for you.

Check the install with agent-browser doctor

Before you hand the browser to an agent, run the built-in health check. It confirms the CLI, the Chrome binary, the socket directory and the CDN, then does the test that actually matters: it launches Chrome headless and loads about:blank. On Fedora that passed first time:

agent-browser doctor

The output is trimmed here to the one warning and the launch test, which are the lines to read. A pass on the launch test means everything after this point will work:

Recording
  warn  ffmpeg not found on PATH (only needed for `record`)
        fix: apt install ffmpeg (Debian/Ubuntu)

Launch test
  pass  Headless launch + about:blank in 3.08s

Summary: 8 pass, 1 warn, 0 fail

You can ignore the ffmpeg warning unless you plan to use record. On Fedora the suggested apt command is wrong, of course; the package is ffmpeg-free from the Fedora repos or ffmpeg from RPM Fusion. The “No encryption key set” line under Security is also fine, because agent-browser creates a key the first time you save a login.

Fix “No usable sandbox!” on Ubuntu 26.04

Ubuntu is where most people get stuck. The exact same doctor run failed the launch test there, and Chrome’s own error explains why:

agent-browser doctor launch test failing on Ubuntu 26.04 with Chrome No usable sandbox and AppArmor userns restriction set to 1

Since 24.04, Ubuntu sets kernel.apparmor_restrict_unprivileged_userns = 1 by default (23.10 added the switch but left it off), which blocks unprivileged user namespaces unless an AppArmor profile allows them. Chrome’s sandbox depends on those namespaces. Ubuntu ships a chrome profile for /opt/google/chrome/chrome, but agent-browser’s copy lives in your home directory, so nothing covers it and Chrome exits before it writes its DevTools port.

Doctor’s hint is --args "--no-sandbox". It works, but it turns off Chrome’s sandbox for every page the agent opens, and an agent opens pages you haven’t vetted. The better fix is a small AppArmor profile, modelled on Ubuntu’s own chrome profile, that grants userns to agent-browser’s Chrome path only:

sudo vim /etc/apparmor.d/agent-browser-chrome

Paste this profile. The glob matches every home under /home and every Chrome version agent-browser downloads, so it survives agent-browser install pulling a newer build. If you run agent-browser as root or your home lives elsewhere, change the path to match:

abi <abi/5.0>,
include <tunables/global>

profile agent-browser-chrome /home/*/.agent-browser/browsers/chrome-*/chrome flags=(unconfined) {
  userns,
  include if exists <local/agent-browser-chrome>
}

Load the profile and run doctor again:

sudo apparmor_parser -r /etc/apparmor.d/agent-browser-chrome
agent-browser doctor

The launch test now passes, and in 1.46 seconds it was faster than the Fedora VM, which had half the vCPUs:

AppArmor profile granting userns to agent-browser Chrome on Ubuntu 26.04 and doctor passing with 9 pass, 1 warn and 0 fail

The profile is loaded at boot like any other file in /etc/apparmor.d/, so you only do this once per machine. Fedora doesn’t restrict user namespaces this way, which is why it never hit the error.

Drive a page by hand first

It’s worth driving the browser yourself for five minutes before an agent does, because you’ll read agent transcripts far more easily once you know what each command returns. I served a small support desk page on http://127.0.0.1:8080 with a ticket form, a ticket table and a second Tickets page. Point the commands at any page you like; the refs such as @e6 are numbered per page, so yours will differ and you’ll read them from your own snapshot. Open it and take an interactive snapshot:

agent-browser open http://127.0.0.1:8080
agent-browser snapshot -i

The first open took 2.9 seconds because it started the daemon and Chrome. Every command after that reused them; the snapshot came back in 13 milliseconds. Then fill the form using the refs from that snapshot, submit it and read the result:

agent-browser fill @e6 'Lorna'
agent-browser fill @e7 '[email protected]'
agent-browser select @e8 high
agent-browser check @e9
agent-browser fill @e10 'Wi-Fi drops on the 3rd floor'
agent-browser click @e11
agent-browser get text '#out'

Each action answers with ✓ Done, and the status line confirms the form went through with the right priority:

agent-browser snapshot -i refs then fill, select, check and click on a local form on Fedora 45

Notice that refs and CSS selectors both work. @e6 came from the snapshot, while '#out' is an ordinary selector. Refs are what agents use, because they don’t have to guess at the DOM. They’re tied to the current page, though, so after a navigation you take a new snapshot; the Tickets page handed out fresh refs starting at e27.

Follow the Tickets link, confirm where you landed, save a screenshot and close the browser:

agent-browser click @e4
agent-browser get url
agent-browser screenshot ~/tickets.png
agent-browser close

The URL check and the screenshot path tell you both steps worked:

✓ Done
http://127.0.0.1:8080/tickets.html
✓ Screenshot saved to /home/lorna/tickets.png
✓ Browser closed

Just before closing, the daemon and Chrome, 19 processes in all, added up to 497 MB of proportional memory (PSS) on the Fedora VM. That’s a normal Chrome footprint, and it’s the number to budget for each session you keep open.

Run separate sessions with –session

Everything above ran in the default session. Add --session <name> and agent-browser starts another browser with its own cookies, storage and history, which is what you want when two agents work at once or when you keep a logged-in session apart from a scratch one:

agent-browser --session ops open http://127.0.0.1:8080
agent-browser --session scratch open http://127.0.0.1:8080/tickets.html
agent-browser session list

Both sessions show up, each with its own Chrome:

Active sessions:
  scratch
  ops

A session name on its own doesn’t save anything to disk. Cookies survive a restart only when you add --restore (or a --profile directory), so a plain --session is a clean browser every time the daemon exits. Run agent-browser close --all now to shut every session down in one go, so the next section starts its sessions fresh with the security flags applied at launch.

Lock it down before an agent uses it

By default agent-browser lets the agent go anywhere and do anything, including running JavaScript with eval. The security page in the agent-browser docs lists the opt-in controls, and two of them are worth turning on for any agent that reads untrusted pages.

The first is a domain allowlist. It blocks navigations and sub-resource requests to anything off the list, so a prompt-injected page can’t send the agent somewhere else:

agent-browser --session ops --allowed-domains '127.0.0.1' open http://127.0.0.1:8080
agent-browser --session ops open https://example.com

The second open is refused before Chrome ever makes the request:

✗ Domain 'example.com' is not in the allowed domains list

The second control is an action policy, a JSON file listing which command categories are allowed. This is the part that trips people up: in my runs the docs’ example, "deny": ["eval", "download", "upload"], did not stop eval. The daemon names that action evaluate, and only a policy that lists evaluate blocked it. The screen below condenses my Ubuntu runs into one view: the allowlist refusal, then a test session using a policy with both names:

agent-browser allowed-domains blocking example.com and action policy denying evaluate on Ubuntu 26.04

So until the docs and the daemon agree, list both names. Create the policy file:

vim ~/policy.json

Add the deny list with both spellings of eval:

{"default": "allow", "deny": ["eval", "evaluate", "download", "upload"]}

Then pass it when a new session starts and test it with an eval:

agent-browser --session p5 --action-policy ~/policy.json open http://127.0.0.1:8080
agent-browser --session p5 eval 'document.title'

You should see the denial instead of the page title:

✗ Action 'evaluate' denied by policy: Action 'evaluate' is denied by policy

A strict policy that denies everything except an allow list works too, but add close to that list. Without it the policy blocks close and even close --all, and the error H3 near the end shows the way out. This is the strict file that worked for me as ~/strict.json:

{"default": "deny", "allow": ["navigate", "snapshot", "get", "close"]}

When you’re done testing, run agent-browser close --all again so the ops and p5 sessions don’t keep their browsers running.

Keep passwords out of the model with the auth vault

When the agent needs to sign in somewhere, save the login once yourself and let the agent refer to it by name. The password goes in on stdin, so it doesn’t land in shell history, and the agent only ever sees auth login labdesk:

read -rsp 'Password: ' PW; echo; printf '%s\n' "$PW" | agent-browser auth save labdesk --url http://127.0.0.1:8080/ --username lorna --password-stdin; unset PW
agent-browser auth list

The list shows the profile name, user and URL, never the secret:

Auth profiles:
  labdesk lorna http://127.0.0.1:8080/

The first save created ~/.agent-browser/.encryption-key (mode 600) and an encrypted auth/labdesk.json next to it. Back that key file up, or set AGENT_BROWSER_ENCRYPTION_KEY yourself, because losing it means re-saving every login.

Add the skill to Claude Code and Codex

The skill route teaches your agent to call the CLI through its normal shell tool. If you don’t have the agents yet, both install from npm with the same prefix you set earlier:

npm install -g @anthropic-ai/claude-code @openai/codex
claude --version; codex --version

That gave me Claude Code 2.1.323 and codex-cli 0.169.0. Run the skill installer from your project directory (mine was a fresh git repo); --agent picks the agents and -y skips the prompts:

mkdir -p ~/helpdesk-app && cd ~/helpdesk-app && git init -q
npx -y skills add vercel-labs/agent-browser --agent claude-code codex -y

It clones the repo, finds one skill and writes it once, then links it for Claude Code:

◇  Installed 1 skill ─────────────────────────────╮
│                                                 │
│                                                 │
│  Agent Browser                                  │
│  ✓ ~/helpdesk-app/.agents/skills/agent-browser  │
│    universal: Codex                             │
│    symlinked: Claude Code                       │
│                                                 │
├─────────────────────────────────────────────────╯

So the real file is .agents/skills/agent-browser/SKILL.md, which Codex reads directly, and .claude/skills/agent-browser is a symlink to it for Claude Code. Commit both if your team should share the skill, and add -g to install it for your user instead of the project.

Open that SKILL.md and you’ll find it’s only 3,306 bytes. It’s a stub that tells the agent to run agent-browser skills get core before anything else, so the instructions always match the CLI you have installed. That design has a cost you should know about:

  • You pay about 0.9 KB in every session for the skill’s description, which Claude Code keeps in context whether the browser gets used or not.
  • You pay the 3.3 KB stub body only when the agent invokes the skill.
  • You pay another 16,230 bytes when the agent loads skills get core, once per task that touches the browser.
  • You can skip skills get core --full in normal use, because at 153,698 bytes it’s nearly ten times the core guide.

Run agent-browser skills list to see the other built-in guides (dogfood, electron, slack, derive-client and more). The agent loads those only when a task calls for them.

Register agent-browser mcp in both agents

The MCP route gives the agent typed tools such as agent_browser_snapshot and agent_browser_click instead of shell commands. The server is the same binary started with mcp, speaking JSON-RPC over stdio, so registering it is one command in each agent:

claude mcp add agent-browser -- agent-browser mcp
claude mcp list
codex mcp add agent-browser -- agent-browser mcp
codex mcp list

Claude Code starts the server to check it and reports it connected. Codex writes a short [mcp_servers.agent-browser] table to ~/.codex/config.toml, which you can also add by hand:

claude mcp add and codex mcp add registering agent-browser mcp, with claude mcp list showing Connected

Claude Code saved the server to ~/.claude.json for this project only (its default local scope), while Codex registered it globally. Codex’s “Auth Unsupported” column only means the server has no OAuth, which is expected for a local stdio server. I had no OpenAI key on the lab machine, so for Codex I verified the skill files, the registration and the config, not a full task run. With Claude Code I ran a full task through the skill route (next section), while the MCP server was exercised by the benchmark client further down.

The default tool profile is core: 33 tools covering navigation, snapshots, interaction, waits, reads, screenshots, JavaScript eval and basic tabs. Their schemas came to 24,628 characters in my tools/list capture, which the agent carries in context for the whole session. If you need request inspection, cookies or React inspection, add the matching profiles, for example agent-browser mcp --tools core,network,state; every profile you add grows that schema, so leave the default alone unless a task needs more.

Watch Claude Code run a task with the skill

To see how an agent actually uses this, I gave a Claude Code session the skill stub and one plain-English task. It had to create the same ticket, report the status message, count the tickets on the Tickets page and close the browser. Every agent-browser call went through a small logging wrapper on my workstation that ran the command on the Fedora VM over SSH, so the log below is the agent’s real command trail, trimmed to two of the result lines:

19:33:38 $ agent-browser skills get core
  -> exit 0, 1.817979112 s, 16229 bytes
19:33:49 $ agent-browser session id --scope worktree --prefix task
19:33:54 $ agent-browser --session task-400867382f47 open http://127.0.0.1:8080
19:33:59 $ agent-browser --session task-400867382f47 snapshot -i
  -> exit 0, 1.829883675 s, 878 bytes
19:34:06 $ agent-browser --session task-400867382f47 fill @e6 Lorna
19:34:08 $ agent-browser --session task-400867382f47 fill @e7 [email protected]
19:34:10 $ agent-browser --session task-400867382f47 select @e8 high
19:34:12 $ agent-browser --session task-400867382f47 check @e9
19:34:14 $ agent-browser --session task-400867382f47 fill @e10 Wi-Fi\ drops\ on\ the\ 3rd\ floor
19:34:18 $ agent-browser --session task-400867382f47 snapshot -i
19:34:24 $ agent-browser --session task-400867382f47 click @e11
19:34:26 $ agent-browser --session task-400867382f47 snapshot
19:34:32 $ agent-browser --session task-400867382f47 click @e4
19:34:34 $ agent-browser --session task-400867382f47 snapshot
19:34:42 $ agent-browser --session task-400867382f47 get url
19:34:44 $ agent-browser --session task-400867382f47 close

It followed the skill exactly: it loaded the core guide first, made itself a worktree-scoped session so it wouldn’t touch my default one, checked the form with a second snapshot before submitting, and closed the browser at the end. It reported “Ticket #1042 created for Lorna (priority: high)” and three tickets. It also noticed on its own that the new ticket never appeared in the list, which is true; my test page doesn’t store anything.

The whole task took 66 seconds. Read the timings carefully, though: every call cost about 1.8 seconds, and almost all of that was the SSH round trip in my setup. Without the SSH hop, fill and click took 22 to 42 milliseconds through the MCP server, as the next section shows. Page content the model had to read added up to under 4.5 KB across four snapshots, while the core guide on its own was 16 KB.

Compare it with Playwright MCP on the same page

Playwright MCP is what most people already have wired into Claude Code, so it’s the fair comparison. I wrote a 150-line Node MCP client that starts each server, lists its tools and runs the same form flow: open, snapshot, two fills, a select and a click. Then it measures memory (PSS) for the server and every browser process. Both servers drove the same Chrome for Testing binary headless, Playwright MCP being the current @playwright/mcp release started with --headless --isolated --executable-path. Each ran five times on a 2 vCPU, 4 GB Fedora 45 VM, and the figures are medians:

agent-browser mcp vs Playwright MCP benchmark medians: tool schema size, snapshot chars, step latency and memory on Fedora 45

Here are the same numbers side by side. Token counts are characters divided by four, a rough rule of thumb rather than a real tokenizer:

Measured (median of 5)agent-browser mcpPlaywright MCP
Tools exposed3325
Tool schema in context24,628 chars (~6,157 tokens)21,177 chars (~5,294 tokens)
Full snapshot of the form page1,504 chars (~376 tokens)1,658 chars (~415 tokens)
Interactive snapshot (-i)878 chars (~220 tokens)No interactive-only filter (full tree, 1,658 chars)
First open, including browser launch2,278 ms583 ms
Fill one field22 ms47 ms
Click submit42 ms587 ms
Everything returned for the whole flow4,157 chars (~1,039 tokens)4,437 chars (~1,109 tokens)
Memory after the flow (PSS)511 MB485 MB

Read the two snapshot rows together before you credit agent-browser with a leaner page model. The full trees are close, 1,504 characters against 1,658, so the format alone saves about 10%. The real cut comes from -i, which takes the tree from 1,504 to 878 characters because it drops static text such as the intro sentence under the heading and keeps the controls, headings and table cells, each with a ref. Playwright MCP has no interactive-only filter. It can scope a snapshot with target or cap it with depth, but called plainly it returns the whole tree, as it did here. On a page with a long article or a big table, that is the gap that grows with the page. Actions are faster too: Playwright waits for the page to settle after a click, which is safer on a slow app and cost 545 extra milliseconds on mine.

Two results go the other way, and they matter more than the snapshot for short tasks. agent-browser’s MCP server carries a slightly larger tool list into every turn. Over the whole flow the two also returned almost the same amount of text, because current Playwright MCP writes post-click snapshots to a file instead of sending them back to you. Memory was a wash, since both are just Chrome. agent-browser’s slower first open is its daemon starting Chrome on demand. Playwright’s own server start took 536 ms in initialize, and its first navigate 583 ms, so the gap is smaller than the open column alone suggests.

My takeaway: if your agent mostly reads pages, the CLI plus the skill is the leanest setup, since the only fixed cost is a description under 1 KB and snapshots stay small. If you already run Playwright MCP and your tasks are a handful of clicks, switching to agent-browser’s MCP server won’t save you much context. Playwright’s own README now makes a similar point and recommends its CLI with skills over MCP for coding agents. For an engine with no Chrome behind it at all, our Cloudflare Kitesurf build and benchmark times it against agent-browser and Playwright MCP on the same eight pages. Chrome’s own DevTools MCP server is the third option, and our Chrome DevTools MCP guide with its agent-browser comparison counts the tools each of the three loads.

Try the Lightpanda engine

agent-browser can drive Lightpanda instead of Chrome with --engine lightpanda, but it doesn’t download the engine for you. Without the binary on your PATH, the open fails straight away:

agent-browser --session lp --engine lightpanda open http://127.0.0.1:8080

The error points you to the installation docs or --executable-path:

✗ Auto-launch failed: Lightpanda not found. Install it from https://lightpanda.io/docs/open-source/installation or use --executable-path.

Lightpanda publishes tagged releases as a single static binary, and GitHub lists a SHA-256 digest next to each asset. Pin the release and check the digest before you put the binary on your PATH. These are the publisher’s release-page steps; I didn’t get them past my lab, as the next paragraph explains:

LP_VERSION=1.0.3   # pin: release this section was written against; newer tags at https://github.com/lightpanda-io/browser/releases
LP_SHA256=53eb34da09159dcf8f04865dbfe3e63e9a652062684495aa7ced5ddd7c82e8b0
curl -fL -o lightpanda "https://github.com/lightpanda-io/browser/releases/download/${LP_VERSION}/lightpanda-x86_64-linux"
echo "${LP_SHA256} *lightpanda" | sha256sum -c
install -D -m 755 lightpanda ~/.local/bin/lightpanda

The digest belongs to the 1.0.3 x86_64 asset, so change both variables together when you move the pin; sha256sum -c should print lightpanda: OK before you install anything. Lab VMs here only receive third-party binaries through a fetch helper the site owner approves, and on 13 November 2026 it downloaded that exact file and passed the checksum, then failed on unpacking: tar: This does not look like a tar archive. The helper unpacks every artifact as a tarball, and the 1.0.3 release has no tarball holding the binary (the binary is bare and the .deb is an ar archive). So there’s no Lightpanda snapshot, timing or memory figure in this article, and I’d rather leave the row empty than borrow numbers. Our Lightpanda install and benchmark guide measures the engine on its own against headless Chrome.

What I could confirm on the agent-browser side are its limits. It refuses --profile with Lightpanda (“Profiles are not supported with Lightpanda”), and its docs say the same of --state and extensions, so persistent profiles and saved state files stay a Chrome feature. On Ubuntu, a freshly created ~/.local/bin only joins your PATH at your next login, so until then, or if the binary lives elsewhere, pass --executable-path ~/.local/bin/lightpanda with --engine lightpanda.

Know where browser-use fits

browser-use solves a different problem, so I didn’t put it in the benchmark. It’s a Python library (Python 3.11 or newer) that runs its own agent loop: you give it a task, and the model writes Python against Chrome DevTools in a persistent REPL until it finishes, according to its PyPI page. That suits an app that needs browsing built in. If you already have Claude Code or Codex as the agent, agent-browser or Playwright gives that agent hands without adding a second model loop.

Fix the errors I hit along the way

Apart from the Ubuntu sandbox error covered earlier, these are the messages that came up during testing, with the cause and the fix for each.

Element not found: #status. Verify the selector, role, or name is correct

I guessed the status element’s ID instead of reading it. The page used id="out" with role="status", so get text '#out' worked. When a CSS selector misses, run snapshot without -i to see non-interactive elements, or use the ref from the snapshot instead of guessing. It’s the same reason the skill tells agents to prefer refs.

Action ‘close’ denied by policy: Action ‘close’ is not in the allow list

My first strict policy allowed only navigate, snapshot and get, and I started session p4 with it. That blocks close, and close --all was refused too (“Failed to close p4”). Add "close" to the allow list in ~/strict.json, as in the strict file shown earlier, then pass the edited file with the close command, and the session shuts down:

agent-browser --session p4 --action-policy ~/strict.json close

After that, agent-browser session list printed “No active sessions”. Allowing close from the start avoids the whole thing.

eval still runs with “deny”: [“eval”] in the policy

This one fails silently, which makes it the riskiest of the lot. The command is eval and the docs’ category is eval, but the daemon checks the action name evaluate. List both in deny as shown in the lockdown section, then test the policy with a harmless eval 'document.title' before you trust it.

Pick the route that fits your agent

Once doctor passes, everything else is configuration, and the choice mostly comes down to how your agent already works. Use this to decide:

  • You want the smallest standing context cost: install the skill and let the agent call the CLI through its shell tool.
  • You want typed tools, or your client can’t run shell commands: register agent-browser mcp and keep the default core profile.
  • You’re on Ubuntu 24.04 or newer: add the AppArmor profile before anything else rather than reaching for --no-sandbox.
  • You’re pointing an agent at pages you don’t control: start every session with --allowed-domains and a policy that denies both eval and evaluate.

If you’d rather give Claude Code the whole Linux desktop instead of a browser, our agent-desktop guide for Ubuntu uses the same snapshot and ref idea on GTK apps. For the commands you’ll use around all of this, keep the Claude Code cheat sheet and the Codex CLI cheat sheet open, and the Claude Code plugins guide covers how skills arrive bundled in plugins.

Keep reading

Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) Ubuntu Upgrade Ubuntu 24.04 to Ubuntu 26.04 LTS (Step by Step) UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) AI Ollama Models Cheat Sheet: Best Models by VRAM, Tested (PDF) Dual GPU LLM Build: PCIe x8/x8 vs x16/x4, PSU and Cooling AI Dual GPU LLM Build: PCIe x8/x8 vs x16/x4, PSU and Cooling Deploy Collabora Online Office on Ubuntu with Let’s Encrypt SSL Cloud Deploy Collabora Online Office on Ubuntu with Let’s Encrypt SSL Install GitBucket on Ubuntu / Debian Linux Debian Install GitBucket on Ubuntu / Debian Linux

Leave a Comment

Press ESC to close