<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wasabi hu</title>
    <description>The latest articles on DEV Community by Wasabi hu (@wasabi_hu_d2b4b4d9b9f6bda).</description>
    <link>https://dev.to/wasabi_hu_d2b4b4d9b9f6bda</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4255855%2Ffa7e4cf0-b7e4-446c-abd6-bf508b947bf9.jpg</url>
      <title>DEV Community: Wasabi hu</title>
      <link>https://dev.to/wasabi_hu_d2b4b4d9b9f6bda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wasabi_hu_d2b4b4d9b9f6bda"/>
    <language>en</language>
    <item>
      <title>Stop AI Agents From Hijacking Your Chrome Window: Fork Live Sessions into Headless Playwright MCP</title>
      <dc:creator>Wasabi hu</dc:creator>
      <pubDate>Fri, 20 Nov 2026 14:05:58 +0000</pubDate>
      <link>https://dev.to/wasabi_hu_d2b4b4d9b9f6bda/stop-ai-agents-from-hijacking-your-chrome-window-fork-live-sessions-into-headless-playwright-mcp-336g</link>
      <guid>https://dev.to/wasabi_hu_d2b4b4d9b9f6bda/stop-ai-agents-from-hijacking-your-chrome-window-fork-live-sessions-into-headless-playwright-mcp-336g</guid>
      <description>&lt;p&gt;Whenever I ask an AI coding agent (&lt;strong&gt;Claude Code&lt;/strong&gt;, &lt;strong&gt;Cursor&lt;/strong&gt;, or &lt;strong&gt;Google Antigravity&lt;/strong&gt;) 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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Launch a fresh headless browser&lt;/strong&gt; -&amp;gt; hit login walls, SSO, and 2FA every single session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attach directly to my live Chrome window&lt;/strong&gt; -&amp;gt; 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.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To fix this cleanly, I built &lt;strong&gt;&lt;a href="https://github.com/wasabihu/sessfork" rel="noopener noreferrer"&gt;sessfork&lt;/a&gt;&lt;/strong&gt; — a pure Python, &lt;strong&gt;zero-runtime-dependency&lt;/strong&gt; CLI that decouples your foreground UI viewport from your browser auth state in a single command.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub (MIT)&lt;/strong&gt;: &lt;a href="https://github.com/wasabihu/sessfork" rel="noopener noreferrer"&gt;https://github.com/wasabihu/sessfork&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Visual Guide&lt;/strong&gt;: &lt;a href="https://wasabihu.github.io/sessfork/" rel="noopener noreferrer"&gt;https://wasabihu.github.io/sessfork/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How &lt;code&gt;sessfork&lt;/code&gt; Works Under the Hood
&lt;/h2&gt;

&lt;p&gt;Instead of taking over your main browser window, &lt;code&gt;sessfork&lt;/code&gt; snapshots only the auth state you explicitly ask for and hands it to a silent background headless Playwright MCP server (&lt;code&gt;sessfork-browser&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lock-free snapshots of live Chrome&lt;/strong&gt;: Reads Chromium's SQLite &lt;code&gt;Cookies&lt;/code&gt; database and LevelDB &lt;code&gt;Local Storage/leveldb&lt;/code&gt; without locking or closing your running browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cookies + SPA/JWT LocalStorage support&lt;/strong&gt;: 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 &lt;code&gt;localStorage&lt;/code&gt; carry over cleanly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain-scoped isolation (&lt;code&gt;0600&lt;/code&gt;)&lt;/strong&gt;: Strictly filters by an explicit domain allowlist (e.g., &lt;code&gt;sessfork github.com linear.app&lt;/code&gt;) and atomically writes a standard Playwright &lt;code&gt;storageState&lt;/code&gt; JSON file with &lt;code&gt;0600&lt;/code&gt; permissions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-restart hot reload&lt;/strong&gt;: Automatically wires &lt;code&gt;sessfork-browser&lt;/code&gt; (&lt;code&gt;@playwright/mcp --headless&lt;/code&gt;) 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.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  10-Second Quickstart
&lt;/h2&gt;

&lt;p&gt;Try it immediately with &lt;code&gt;uvx&lt;/code&gt; (no global install needed):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uvx --from git+https://github.com/wasabihu/sessfork sessfork github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or run the one-click setup script to auto-detect your installed AI editors, wire the background &lt;code&gt;sessfork-browser&lt;/code&gt; MCP server, and install the global Agent &lt;code&gt;SKILL.md&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/wasabihu/sessfork/main/install.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once configured, you don't even have to remember CLI flags — just talk to your agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Use &lt;code&gt;sessfork&lt;/code&gt; to fork my &lt;code&gt;github.com&lt;/code&gt; login session into &lt;code&gt;sessfork-browser&lt;/code&gt;, then silently check my unread notifications and review the failing PR checks without touching my active Chrome window."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  How Is This Different From Dedicated AI Browsers (like &lt;code&gt;ego-lite&lt;/code&gt;)?
&lt;/h2&gt;

&lt;p&gt;A few people asked how &lt;code&gt;sessfork&lt;/code&gt; compares to dedicated AI browsers such as &lt;code&gt;ego-lite&lt;/code&gt;. Both solve the "don't disturb me while the agent browses" problem, but they take very different paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keep your native browser&lt;/strong&gt;: Dedicated AI browsers ship a separate Chromium desktop app and ask you to migrate or run a second daily browser. &lt;code&gt;sessfork&lt;/code&gt; is a tiny stdlib-only CLI — you stay in your existing Chrome, Arc, Brave, or Edge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Least-privilege domain allowlist&lt;/strong&gt;: 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. &lt;code&gt;sessfork&lt;/code&gt; forks &lt;strong&gt;only the 1–2 domains you explicitly name&lt;/strong&gt; as a one-way snapshot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standard Playwright ecosystem&lt;/strong&gt;: Because &lt;code&gt;sessfork&lt;/code&gt; produces standard Playwright &lt;code&gt;storageState&lt;/code&gt;, it works out of the box with official &lt;code&gt;@playwright/mcp&lt;/code&gt; as well as your own Playwright scripts and headless automation pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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, &lt;code&gt;sessfork&lt;/code&gt; is much lighter and cleaner.&lt;/p&gt;




&lt;h2&gt;
  
  
  Security Guardrails
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No silent all-domain dumps&lt;/strong&gt;: You explicitly pass the domains to fork.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keychain stays in charge&lt;/strong&gt;: On macOS, Keychain prompts for &lt;code&gt;"Chrome Safe Storage"&lt;/code&gt; when decrypting cookies (or pass &lt;code&gt;--no-cookies&lt;/code&gt; for pure &lt;code&gt;localStorage&lt;/code&gt; JWT apps to skip Keychain entirely).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy cleanup&lt;/strong&gt;: Run &lt;code&gt;sessfork --clear &amp;lt;domain&amp;gt;&lt;/code&gt; or &lt;code&gt;sessfork --clear&lt;/code&gt; at any time to wipe cached session snapshots.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/wasabihu/sessfork" rel="noopener noreferrer"&gt;https://github.com/wasabihu/sessfork&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Visual Guide: &lt;a href="https://wasabihu.github.io/sessfork/" rel="noopener noreferrer"&gt;https://wasabihu.github.io/sessfork/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
    </item>
  </channel>
</rss>
