Whenever I ask an AI coding agent (Claude Code, Cursor, or Google Antigravity) to check an authenticated web page — a GitHub PR, a Linear sprint board, a Notion doc, or an internal dashboard — browser automation usually leaves me with two frustrating options:
- Launch a fresh headless browser -> hit login walls, SSO, and 2FA every single session.
- Attach directly to my live Chrome window -> the agent steals window focus, switches tabs while I'm reading or coding, and gets access to every other open tab in my main browser.
To fix this cleanly, I built sessfork — a pure Python, zero-runtime-dependency CLI that decouples your foreground UI viewport from your browser auth state in a single command.
- GitHub (MIT): https://github.com/wasabihu/sessfork
- Interactive Visual Guide: https://wasabihu.github.io/sessfork/
How sessfork Works Under the Hood
Instead of taking over your main browser window, sessfork snapshots only the auth state you explicitly ask for and hands it to a silent background headless Playwright MCP server (sessfork-browser):
-
Lock-free snapshots of live Chrome: Reads Chromium's SQLite
Cookiesdatabase and LevelDBLocal Storage/leveldbwithout locking or closing your running browser. -
Cookies + SPA/JWT LocalStorage support: Decrypts cookies in memory via native OS APIs (zero third-party Python packages) and performs LevelDB MVCC sequence reconciliation so modern SPA bearer tokens stored in
localStoragecarry over cleanly. -
Domain-scoped isolation (
0600): Strictly filters by an explicit domain allowlist (e.g.,sessfork github.com linear.app) and atomically writes a standard PlaywrightstorageStateJSON file with0600permissions. -
Zero-restart hot reload: Automatically wires
sessfork-browser(@playwright/mcp --headless) into Claude Code, Cursor, and Antigravity. When you fork a new domain later, your agent hot-reloads the updated state into memory without restarting MCP.
10-Second Quickstart
Try it immediately with uvx (no global install needed):
uvx --from git+https://github.com/wasabihu/sessfork sessfork github.com
Or run the one-click setup script to auto-detect your installed AI editors, wire the background sessfork-browser MCP server, and install the global Agent SKILL.md:
curl -fsSL https://raw.githubusercontent.com/wasabihu/sessfork/main/install.sh | bash
Once configured, you don't even have to remember CLI flags — just talk to your agent:
"Use
sessforkto fork mygithub.comlogin session intosessfork-browser, then silently check my unread notifications and review the failing PR checks without touching my active Chrome window."
How Is This Different From Dedicated AI Browsers (like ego-lite)?
A few people asked how sessfork compares to dedicated AI browsers such as ego-lite. Both solve the "don't disturb me while the agent browses" problem, but they take very different paths:
-
Keep your native browser: Dedicated AI browsers ship a separate Chromium desktop app and ask you to migrate or run a second daily browser.
sessforkis a tiny stdlib-only CLI — you stay in your existing Chrome, Arc, Brave, or Edge. -
Least-privilege domain allowlist: Many developers don't want to import their entire Chrome profile (banking, primary email, corporate SSO, extensions, and every open tab) into an AI browser.
sessforkforks only the 1–2 domains you explicitly name as a one-way snapshot. -
Standard Playwright ecosystem: Because
sessforkproduces standard PlaywrightstorageState, it works out of the box with official@playwright/mcpas well as your own Playwright scripts and headless automation pipelines.
If you want a visual cursor showing every click or routinely deal with heavy headed anti-bot checks, a dedicated AI browser is great. If you want to keep your native browser untouched and expose only specific domains to a silent headless agent, sessfork is much lighter and cleaner.
Security Guardrails
- No silent all-domain dumps: You explicitly pass the domains to fork.
-
Keychain stays in charge: On macOS, Keychain prompts for
"Chrome Safe Storage"when decrypting cookies (or pass--no-cookiesfor purelocalStorageJWT apps to skip Keychain entirely). -
Easy cleanup: Run
sessfork --clear <domain>orsessfork --clearat any time to wipe cached session snapshots.
Check out the repo and the interactive architecture walkthrough if you'd like to give it a spin — feedback and edge-case reports are always welcome!
- Repo: https://github.com/wasabihu/sessfork
- Visual Guide: https://wasabihu.github.io/sessfork/
Top comments (0)