← Blog

How-to5 min read

Using Claude Code with Chrome and Codex Browser: live debugging, Playwright, and previews

How to connect Claude Code to Chrome (extension, console logs, login limits) and use Codex Browser or Playwright, plus live dev-server previews in Mirasim.

Previewing a web app produced by a coding agent and leaving review notes in MirasimPreviewing a web app produced by a coding agent and leaving review notes in Mirasim

The short answer

Claude Code connects to your existing Chromium browser through the Claude in Chrome extension so it can read console errors, inspect the DOM, and test flows using your logged-in tabs — but it requires a /login Anthropic subscription and doesn't work in WSL. Codex doesn't include a browser in the CLI or IDE extension; browser previews live in the ChatGPT desktop app (with an isolated profile) and Codex Cloud, while the CLI relies on headless Playwright tests.

Claude Code + ChromeCodex Browser
Where it runsCLI and VS Code via Claude in Chrome extension (v1.0.36+)ChatGPT desktop app (built-in) or Codex Cloud; not in Codex CLI / IDE
Browser profileShares your existing browser login state (pauses on login / CAPTCHA)Separate browser profile in desktop app; doesn't auto-share your tabs
Auth requirementsDirect claude.ai /login subscription only (no API key, setup-token, Bedrock/Vertex)ChatGPT sign-in for desktop browser and Codex Cloud
Platform caveatsChrome, Edge, Brave, Arc, Vivaldi, Opera; not supported in WSLUse headless Playwright in Codex CLI or CI pipelines

Claude Code with Chrome

Install the Claude in Chrome extension (version 1.0.36 or later) in Chrome, Edge, or another Chromium browser, then sign in to Claude Code with /login on a Pro, Max, Ultra, Team, or Enterprise plan. Claude opens pages inside a Chrome tab group tied to your session.

  • What it can do: read console errors and DOM state directly, compare rendered UI against mocks, test form validation, upload local files, interact with already-signed-in web apps, and record flows as GIFs.
  • Tab-group cleanup: /clear closes the session's tab group (including open pages unless continuing work is still running); /resume or exiting closes it only when it contains nothing but empty tabs.
  • Why --chrome stays off on API keys: the browser extension cannot authenticate with ANTHROPIC_API_KEY, claude setup-token, or cloud providers (Bedrock, Google Cloud, Foundry) — you need a direct claude.ai login.

Codex Browser, Codex Cloud, and Playwright

  • ChatGPT desktop built-in browser: gives you and Codex a shared view of local web apps and websites inside a chat, using a separate profile managed under Settings › Browser. OpenAI recommends GPT-6.2 Astra for visual judgment (such as comparing a page against a screenshot).
  • Codex Cloud Browser Use / Computer Use: start a dev server on localhost:3000 inside the cloud task, watch in the **Desktop** side panel, and click **Take over** / **Return control** whenever you want to drive the mouse and keyboard yourself — no Playwright install required.
  • Codex CLI & repeatable regression tests: since Codex CLI has no built-in browser, give Codex your dev-server command, port, and assertions and ask it to run headless Playwright tests.

Live dev-server previews and artifact reviews in Mirasim

When you run Claude Code, Codex, and other agents side by side in Mirasim, you don't need a separate browser setup for every CLI just to inspect what your agent built.

  • Running pages: whenever an agent or your terminal starts a dev server, its localhost port appears automatically under **Running pages** on the right tool rail — click to preview it right beside your session (and localhost links in chat open in preview too).
  • In-place artifact preview and team notes: web pages, images, slides, PDFs, audio, video, and 3D models handed back by any agent preview in place as a side panel or full stage, and teammates in a shared space can leave comments and notes directly on artifacts.

Questions

Why doesn't Claude Code Chrome integration work in WSL?
Anthropic notes that Chrome integration isn't supported in Windows Subsystem for Linux (WSL). Run Claude Code natively on Windows, macOS, or Linux desktop, or use Playwright tests inside WSL.
Can I use Codex's built-in browser from Codex CLI?
No. OpenAI's Browser docs state that Browser isn't available in Codex CLI or the IDE extension — open the ChatGPT desktop app for the built-in browser, or run Playwright tests from the CLI.
Does Claude in Chrome work with an Anthropic API key?
No. Even if you pass --chrome, Claude Code keeps Chrome integration disabled when authenticated via an API key, claude setup-token, or Bedrock / Google Cloud / Foundry.

Sources

Checked on November 29, 2026 against Anthropic's Chrome integration guide (code.claude.com/docs/en/chrome) and OpenAI's Browser guide (learn.chatgpt.com/docs/browser). Check those pages for updated browser support and enterprise policies.

Keep reading