Claude Code in Chrome: Browser Automation From the CLI

Install the Claude in Chrome extension version 1.0.36 or later, then start Claude Code with the --chrome flag. Run /chrome at any time to check status, manage permissions, reconnect, or pick which browser to use. Selecting Enabled by default removes the need for the flag, at the cost of always loading the browser tools into context.
Yes. Claude opens tabs in a visible Chrome window and shares your browser's login state, so it can act in any site you are already signed into without API connectors or stored credentials. When it reaches a login page or CAPTCHA it pauses and asks you to handle that part manually.
Usually authentication. The browser extension cannot authenticate with an API key or a long-lived token from claude setup-token, so those sessions keep the integration off even when you pass --chrome. It is also unavailable through Bedrock, Google Cloud's Agent Platform and Microsoft Foundry, and unsupported under WSL.
Read-only calls run without a prompt: reading the page, getting page text, finding elements, reading console messages and network requests, and taking a screenshot. Clicks, typing, navigation, tab management and GIF recording all prompt. An otherwise read-only call also prompts when it sets a state-changing flag such as save_to_disk on a screenshot.
Two common causes. The Chrome extension's service worker can go idle during a long session, which breaks the connection — run /chrome and reconnect. Or a JavaScript dialog such as an alert or confirm is blocking the page, which prevents Claude receiving commands at all; dismiss it manually and tell Claude to continue.

Key Takeaway
Claude Code connects to the Claude in Chrome extension to drive a real browser from the terminal. Claude opens tabs in a visible Chrome window and shares your browser's login state, so it can reach any site you are already signed into. It pauses and hands back to you at login pages and CAPTCHAs.
The first time I asked Claude to check a form on my local server, it opened a tab, filled the form with invalid data, read the validation errors off the page, and told me which of the three messages was wrong. Then I asked it to check something in a web app I was signed into, and it just did — because it was my browser, with my session, not a headless one it had to authenticate separately.
That is the whole design and the whole thing to think about. This post covers what sharing browser state actually means, how to connect and what enabling it by default costs you in context, the plan-mode split between reading and acting, the file-upload restrictions, the authentication configurations that silently disable the feature, and the two failures you will hit in a long session.
Claude opens new tabs for browser tasks in a visible Chrome window, in real time, and shares your browser's login state. That is why it can draft in a Google Doc, read your Notion, or click through an internal dashboard with no API connector and no credentials configured anywhere. When it hits a login page or a CAPTCHA it stops and asks you to handle that part manually.
The tabs it opens are collected into a Chrome tab group tied to your session, and what happens to that group when the session ends depends on how it ends. Clearing the conversation closes the group including open pages, unless work that survives the clear is still running. Switching sessions, exiting, or clearing while such work runs closes the group only if it holds nothing but empty new tabs — so pages you might still be reading stay open.
Recording a GIF captures everything visible in the browser, including account details on a logged-in page. That is exactly what you want for a demo of your own app and exactly what you do not want to paste into a public issue. Review a recording before it leaves your team, every time, because the thing that makes this feature convenient is the same thing that puts your session in the frame.
One flag starts a session with the browser attached, and a command manages everything else — status, permissions, reconnecting, and choosing which browser when more than one is connected. Site-level permissions are inherited from the Chrome extension rather than configured in Claude Code, so restricting which sites Claude may browse, click and type on happens in the extension's own settings.
# Launch with the browser attached.
claude --chrome
/chrome # status, permissions, reconnect, pick a browser
# Working when the panel shows:
# Status: Enabled
# Extension: Installed
# "Enabled by default" removes the need for the flag
# Enabling by default increases context usage, because the
# browser tools are then always loaded. If your context budget
# gets tighter, turn it off and use the flag when you need it.
# Requires the Claude in Chrome extension 1.0.36 or later, and
# a direct Anthropic plan. Works in Chrome, Edge, and detected
# in Brave, Arc, Vivaldi and Opera. NOT supported under WSL.The plan-mode behaviour here is more carefully drawn than most people notice, and it is a good model for how a read-only mode should treat a tool that can do both. Reading a page costs nothing and prompts for nothing; changing anything prompts. The interesting part is the exceptions, where a call that is normally read-only becomes state-changing because of one input flag.
# In plan mode the split is by side effect, not by tool.
# Runs with NO permission prompt:
read_page get_page_text find
reading console messages
reading network requests
taking a screenshot
# Prompts for approval:
clicks typing navigation
tab and window management
recording a GIF
# The catch: an otherwise read-only call ALSO prompts when it
# sets a state-changing flag —
# createIfEmpty on the tabs context call
# clear on the console and network readers
# save_to_disk on a screenshot
#
# A batch call runs without a prompt only when EVERY action
# inside it is read-only.When asking Claude to read console output, tell it what pattern to look for rather than asking for everything. Console logs are verbose, and the difference between check the console for errors when the page loads and show me the console is the difference between a useful answer and several thousand tokens of noise you then have to read yourself.
The value is not browser automation on its own — there are better tools for that if automation is all you want. It is chaining a browser action to a coding task in one workflow, without switching context or writing a test harness for something you are going to do once.
Four shapes that pay off:
| Task | Why it beats the alternative |
|---|---|
| Test a change on localhost | Claude fixes the code that caused the console error it just read, in the same turn |
| Verify a UI against a design | Building from a mock and checking the result are usually two people and two days apart |
| Act in an app you are logged into | No API connector, no OAuth setup, no credentials to store anywhere |
| Extract structured data from a page | A scraper you would write, run once, and never maintain |
Claude can attach files from your machine to upload fields on a page — it reads the file and sends the contents to the browser, so this works in remote sessions too. Three restrictions apply, and the third is the one that catches people:
Screenshots can be saved to disk rather than only shown, and Claude reports the path it wrote. That turns the browser into a way of producing artefacts you keep — a before-and-after pair for a pull request, a captured error state to attach to a ticket — rather than only a thing Claude looks at and describes to you.
This is the section worth reading before you conclude something is broken, because none of these produce an error that explains itself. The common thread is authentication: the browser extension cannot authenticate with an API key or a long-lived token, so a session using either keeps the integration off even when you explicitly ask for it.
# Configurations where Chrome integration is off, and the
# reason is authentication rather than anything you configured.
# An API key, or a long-lived token from claude setup-token:
# Claude Code keeps Chrome integration OFF even when you pass
# --chrome, because the browser extension cannot authenticate
# with those credentials. (Before v2.1.216 these sessions
# could enable it, and every connection failed with a 403.)
# Third-party providers — Bedrock, Google Cloud's Agent
# Platform, Microsoft Foundry:
# not available. If you reach Claude only through one of
# those, you need a separate claude.ai account for this.
# Windows Subsystem for Linux:
# not supported at all.
# Organisation policy:
# a deniedMcpServers entry for claude-in-chrome suppresses
# even the install prompt.Setting aside first-install issues, long sessions fail in a small number of predictable ways:
Treat this as a browser that a colleague is driving while you watch, because that is functionally what it is: your session, your logins, your tabs, in a window you can see. That framing gets the two important habits right on its own — you review a recording before sharing it, and you leave it off by default rather than always loaded, turning it on for the task that needs it. Both are cheap, and both matter more the more useful you find it.
Sources & further reading