A persistent browser for Claude Code, free with Playwright MCP, and when Hronaut is worth paying for
You can keep Claude Code signed in to your app between sessions for free with Playwright MCP. Here is the setup, what it does not keep, and the cases where a separate browser app like Hronaut earns its $4 a month.
You ask Claude Code to check a page behind a login. It opens a browser, hits the sign-in form, and asks you for help. Tomorrow it does the same thing again. This post shows how to stop that with a free tool, and then where the free tool stops. I build Hronaut, the paid option at the end, so the comparison tries hard to give the free path its due.
The free way: Playwright MCP
Playwright MCP is Microsoft's open-source MCP server for driving a browser. Add it to Claude Code with one command:
claude mcp add playwright npx @playwright/mcp@latest
Start a new Claude Code session and ask it to open your app. A visible browser window opens. Sign in there yourself, once.
That is all it takes, because Playwright MCP keeps a persistent profile by default. Cookies, local storage and sign-ins are saved to disk and come back in the next session. The profile is chosen per project: its folder name includes a hash of the MCP client's workspace root, so two repositories get two separate profiles and their logins do not mix.
- Linux:
~/.cache/ms-playwright/mcp-{channel}-{workspace-hash} - macOS:
~/Library/Caches/ms-playwright/mcp-{channel}-{workspace-hash} - Windows:
%USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-{workspace-hash}
Two flags are worth knowing:
--user-data-dir=<path>puts the profile where you want it, for example one profile per client account.--isolatedkeeps the profile in memory only, which is what you want for tests that must start clean.--storage-state=<file>loads saved cookies into such a session.
If one project, one account and one Claude Code session at a time is your situation, you can stop reading here. Persistence does not require Hronaut.
What the free way does not keep
The profile survives. The browser does not. Playwright MCP runs as part of your Claude Code session, and the browser it launched goes away with it:
- Open tabs and page state. The next session navigates back to the page and loses anything held only in memory or session storage.
- The evidence. The console and network log, and the screen that showed the bug, are gone once the session ends. Only the agent's report remains.
There are two more limits:
- One browser per profile. Playwright's README says a persistent profile can be used by only one browser instance at a time. Two Claude Code sessions in the same project, or Claude Code and Cursor on the same profile, conflict. The workaround is a separate
--user-data-diror--isolatedfor each extra client, which also means a separate sign-in. - No pause. The window is visible and you can type in it, but nothing stops the agent's next tool call while you enter a password or a 2FA code. You coordinate in chat.
More on why the first limit matters is in Why your agent's browser should outlive the session.
When Hronaut is worth it
Hronaut is a desktop browser that runs as its own app. Claude Code connects to it over a local MCP endpoint, and so can Codex, Cursor and other clients. That changes what survives:
- The browser outlives the session. Close Claude Code and the workspace stays open with its tabs, sign-ins and page state. A new session returns to the same workspace with its ID and private resume key.
- Named workspaces per project or client. Each workspace has its own cookies and site storage, managed in one window instead of profile folders. Several agents can work in separate workspaces at once, and one agent at a time holds write access to each.
- Pause and take over. You can pause agent access, sign in or pass 2FA yourself in the same tab, and hand it back. The agent can ask for your attention on a tab when it reaches a step only a person should do.
- One workspace, several clients. A workspace Claude Code signed in to can be resumed from Codex or Cursor without signing in again.
It costs $4 a month or $24 a year per named user after a 10-day trial, which needs no card and never charges you. It is also one more desktop app to install and keep updated, and it drives Chromium only.
Try both on the same task
Start with Playwright MCP. If you notice you keep losing tabs, run two sessions against the same app, or want to stop the agent while you sign in, install Hronaut and connect Claude Code:
/plugin marketplace add hronaut/hronaut-claude-plugin
/plugin install hronaut@hronaut
Then give the same task:
Create a Hronaut workspace named staging-admin with scratch storage.
Open https://staging.example.com and stop at the sign-in form.
Ask for my attention on that tab, wait for me to sign in,
then open Settings and report what you see.
Close Claude Code, start a new session, and ask it to resume staging-admin. The tab is where you left it. The setup page has configurations for other clients, and the browser MCP guide compares Hronaut with Playwright MCP, Chrome DevTools MCP and extension-based tools in more detail.
Sources: Playwright MCP README (install command, persistent profile, locations, one instance per profile, --isolated, --storage-state), Hronaut README (workspaces, pause and takeover, write lease, resume), hronaut.dev/pricing, hronaut.dev/setup (Claude Code plugin).
Written with the help of AI.