Your agent Mac wants your cookies, not your attention
agentcookie keeps your daily-driver Mac's browser sessions and CLI secrets continuously synced to the headless Mac running your agents, encrypted over Tailscale, with no cloud middleman.

What it does
agentcookie runs on two Macs: the laptop you browse on, and the second Mac that runs agents like OpenClaw or Hermes. It watches Chrome’s cookie store and a local secrets bus, then pushes diffs over your Tailscale tailnet to the agent machine. There, it re-injects the session data into Chrome’s own database, a plaintext sidecar, or per-CLI adapter files so the agent hits the ground authenticated.
The interesting bit
The project treats macOS security features as terrain to navigate rather than obstacles to break. It decrypts Chrome’s App-Bound cookies using the source Mac’s Keychain, ships them through AES-256-GCM inside Tailscale’s WireGuard, and re-encrypts them for the sink Mac’s Keychain on arrival. It even speaks cmux’s RPC dialect and can feed a dedicated Chromium via CDP for browser-use workflows.
Key highlights
- One-way, continuous sync: no vaults to unlock, no “merge” prompts, no per-site re-authentication on the agent machine.
- Universal sink writes directly into the destination Mac’s Default Chrome profile, so unmodified tools like
yt-dlpor Polymarket CLIs read synced sessions transparently. - Per-CLI secrets bus mirrors bearer tokens and API keys to
~/.agentcookie/secrets/<cli>/secrets.env, consumable via env vars or a Go library. - Optional cmux and agent-browser surfaces push cookies into WebKit or a loopback Chromium via CDP for automation frameworks.
- Pairing-derived per-peer keys and blocklist filters on both ends; no cloud broker or external accounts required.
Caveats
- The cmux WebKit surface only injects cookies, so sites relying on
localStorage, IndexedDB, or device-bound sessions like Google Workspace may still need a manual sign-in inside the cmux pane. - WebKit’s Intelligent Tracking Protection can silently drop some cross-site cookies after injection.
- Reading Chrome’s Safe Storage key requires a one-time Keychain grant scoped to the signed installed binary; running an unsigned build or
go runwill prompt for the Keychain password on every execution.
Verdict
Worth a look if you run AI agents or automation on a dedicated Mac mini and are tired of maintaining duplicate login state. If you don’t use macOS, Chrome, or Tailscale, this is not your tool.
Frequently asked
- What is mvanhorn/agentcookie?
- agentcookie keeps your daily-driver Mac's browser sessions and CLI secrets continuously synced to the headless Mac running your agents, encrypted over Tailscale, with no cloud middleman.
- Is agentcookie open source?
- Yes — mvanhorn/agentcookie is open source, released under the MIT license.
- What language is agentcookie written in?
- mvanhorn/agentcookie is primarily written in Go.
- How popular is agentcookie?
- mvanhorn/agentcookie has 655 stars on GitHub.
- Where can I find agentcookie?
- mvanhorn/agentcookie is on GitHub at https://github.com/mvanhorn/agentcookie.