What does starting Claude Code with `--chrome` let the agent do, and what keeps the Chrome integration switched off?
answer
- your browser, your logged-in sessions
- an extension does the clicking
- subscription login only
- status and default in /chrome
- always-loaded tools cost context
basics
~20 sclaude --chrome connects the session to the Claude in Chrome extension, so Claude can open tabs, click, type, read console output and use sites you are signed into. It stays off on an API key or setup-token login, third-party providers and WSL.
solid answer
~50 s`--chrome` connects the session to the **Claude in Chrome** browser extension, which works in Chrome, Edge and other Chromium browsers. Claude opens its own tabs in a visible window that shares your **logged-in sessions**, so it can test a local app, read console errors and DOM state, fill forms or work in any site you are signed into, and it pauses for you at a login page or CAPTCHA. Which sites it may act on is governed by the extension's site permissions, and browser actions go through the normal permission prompts. It needs a direct Pro, Max, Team or Enterprise plan with a `/login` sign-in: with an API key or a `claude setup-token` token Claude Code keeps it off even when you pass `--chrome`, and it is unavailable on Bedrock, Agent Platform, Foundry and in WSL. `/chrome` shows the status and has **Enabled by default**, which loads the browser tools into every session and costs context.
go deeper
Recall that --chrome connects Claude Code to a browser extension that works in your real, logged-in browser, and that /chrome shows whether it is connected.
Explain the requirements: a direct plan with a /login sign-in, no API key or setup-token login, no third-party provider or WSL, and the context cost of enabling it by default.
Scope it safely: rely on the extension's site permissions and permission prompts, keep it off by default where sessions handle untrusted pages, and remember the browser holds your real accounts.
Weigh browser automation on personal logged-in profiles against dedicated test accounts, and set team guidance on which sites the integration may act on.
## What the integration is **Claude in Chrome** is a browser extension that Claude Code drives from the CLI or the VS Code extension. Starting a session with `claude --chrome` connects it to the extension, and Claude gains browser tools exposed through a built-in MCP server named `claude-in-chrome`. Claude opens **new tabs** for its work, gathers them in a tab group tied to your session, and acts in a **visible window** you can watch in real time. Because those tabs share your browser profile, Claude reaches every site you are already **signed into**. That is the point of the feature and also its main risk. ## What it is good for - **Live debugging**: read console errors and DOM state, then fix the code that caused them. - **Checking a change**: open `localhost`, submit a form with bad data and confirm the error messages appear. - **Authenticated apps without an API**: draft in a document editor, file a ticket, update a CRM. - **Data extraction** from pages into a local file, and **file uploads** from your machine into a page's upload field (up to 10 MB per upload, and only files the session may read). - **Recording** an interaction as a GIF to share what happened. When Claude meets a login page or a CAPTCHA it **pauses and asks you** to handle it rather than trying to get past it. ## What keeps it off | Condition | Effect | | :- | :- | | Signed in with an API key or a `claude setup-token` token | Claude Code keeps the integration off even when you pass `--chrome` | | Bedrock, Google Cloud's Agent Platform or Microsoft Foundry | Not available; a separate claude.ai account is needed | | Running inside WSL | Not supported | | Organization denies the `claude-in-chrome` server | The install prompt is not shown | | Remote Control server sessions without `--chrome` | They start with Chrome off, even if you enabled it by default | The plan requirement is a **direct Anthropic plan** (Pro, Max, Team or Enterprise) with a `/login` sign-in, because the extension cannot authenticate with an API key or a model-only token. Before 2.1.216 such sessions could switch the integration on but every connection attempt failed with a 403; current versions simply keep it off. ## Day-to-day control 1. Run `/chrome` to see **Status** and **Extension**, reconnect, manage permissions or pick which connected browser to use. 2. Choose **Enabled by default** in `/chrome` to connect every session without the flag. The setting is shared between the CLI and the VS Code extension and is stored as `claudeInChromeDefaultEnabled`. 3. Leave it off if context matters: with it on, the browser tools and their instructions are always loaded. Connect on demand with `--chrome` instead. A few behaviours are worth knowing before you rely on it: - With more than one browser connected, Claude asks which to use on the first browser action, and **Select browser…** in `/chrome` changes the choice later. - `/clear` closes the session's tab group, open pages included, unless work that survives the clear is still running; exiting closes the group only if it holds nothing but empty new tabs. - In the VS Code extension, typing `@browser` in the prompt box connects the browser for that session. **Site permissions** come from the extension's own settings, and a browser action that needs approval shows a prompt beginning `Claude in Chrome wants to`, with an option to allow all actions on that site for the session. Permission rules that deny `Read` on a file also stop Claude from uploading it. ## Where it sits among the alternatives The docs describe an order of preference for reaching an app: an MCP server for the service if you have one, then Bash for shell work, then Claude in Chrome for browser work, and only then **computer use**, the broadest and slowest option, which is a research preview on macOS for Pro and Max. Chrome integration is therefore the right tool for web UIs; it is not a general screen controller. Because the browser carries your real sessions, treat text on the pages it visits as untrusted input: how web content can try to steer an agent belongs with prompt-injection defences, and here the practical controls are the extension's site permissions and keeping the integration off when you do not need it.
- Why might you leave **Enabled by default** off even though you use the browser integration often?With it on, the browser tools and their instructions are loaded into every session, which increases context usage whether or not the task touches a browser. Leaving it off and starting with `claude --chrome` when you need the browser, or typing `@browser` in the VS Code prompt box, keeps other sessions lighter.
- A developer passes `--chrome` but `/chrome` shows the integration off. What do you check first?How the session is authenticated. With an API key or a long-lived token from `claude setup-token`, Claude Code keeps Chrome integration off because the extension cannot authenticate with those credentials; `/status` shows which credential is in use and `/login` fixes it. Then check for a third-party provider, a WSL shell, and whether the extension is installed in the browser.
- Chrome integration launches a separate headless browser with a clean profile.
- Passing --chrome enables the integration even when signed in with an API key.
- Claude solves CAPTCHAs and login pages on its own to finish the task.
- Turning on Enabled by default has no effect on context usage.
- Chrome integration is the same feature as computer use.