- Published on
Herdr: how my MacBook Pro connects to Ubuntu terminals on a Windows PC

- Authors

- Name
- Nadim Tuhin
- @nadimtuhin
On this page
My agents live on a Windows PC at home. I'm often somewhere else. This post is how I reach them from a MacBook Pro without losing my sessions when the lid closes.
It's one piece of my AI coding agent setup: the part that gets me from my MacBook Pro to the terminals where the work happens.
The problem
My agents run on that Windows PC, inside WSL2 Ubuntu. I sit at a MacBook Pro, sometimes at home, often not. I want the PC's terminals on my MacBook, with all my splits and tabs. And I need them to survive the MacBook closing, losing Wi-Fi, or me switching cafes.
Plain ssh gives me a shell, but the session dies with the connection. Managing layouts across many repos and many agents by hand is more work than it should be.
Herdr is a terminal workspace manager built with coding agents in mind. For me its job is simple: it's the bridge between my MacBook and the PC's Ubuntu terminals.

How it's set up
- The server runs inside WSL2 Ubuntu on the Windows PC. It owns the sessions, the workspaces, the tabs and the panes.
- The client runs on the MacBook Pro. It holds no state of its own.
- The connection is ssh over Tailscale, a private network between my own devices (holding peer-to-peer latency under ~8ms on local Wi-Fi), so nothing on my home network is open to the internet.
From the MacBook, one command attaches:
$ herdr --remote homelab
homelab is a saved machine in Herdr, so I don't type hosts or ports. What I see is the PC's Ubuntu terminals, laid out exactly as I left them.
How I organise it
- A workspace per repo.
- A tab per task, usually in its own git worktree, so two agents never edit the same checkout.
- Panes inside each tab: one running the agent, one plain shell for me to run tests, read logs and check diffs.

The agent processes live on the PC. The MacBook is just a window into them.
Why this works for agents
Agents run for a long time, so persistence matters most. A refactor can take an hour, and a test loop longer. With the terminals living on the PC:
- Closing the MacBook kills nothing. The agents keep going.
- Losing the connection kills nothing. I reconnect and pick up mid-output.
- Switching devices is free. Same session, from wherever I am.


Herdr also has a socket API with helpers for workspaces, tabs, panes and worktrees, so scripts and agents can create and arrange panes too. I mostly drive it by hand, but it's good to know the layout isn't locked inside a UI.
The WSL2 trap
This one bit me. Windows shuts down the WSL2 virtual machine when nothing is attached to it. When that happens, the Herdr server, the agents and everything else inside Ubuntu vanish with it.

The fix is a small keepalive on the Windows side that holds a WSL session open, so the VM never idles out. If you run a server inside WSL2, plan for this before it surprises you at 2 AM.
Takeaways if you're copying this
- Keep the terminals where the work is. If the sessions live on the machine doing the work, any device that can connect becomes a full workstation.
- Don't open ports at home. A private network like Tailscale is less work than hardening an exposed box.
- One worktree per agent. Herdr makes it cheap to give each task its own tab, so use that.
Inside those panes, agents start through 9agent and talk to models through 9Router. The jobs that run when I'm not connected at all are Hermes.
Related posts
- Go berserk: one night with Grok Bot, Orca and every gate still on
My Grok Bot usage reset, so I told my AI teammates to go berserk overnight. They set up Orca, fixed a Windows PC and refreshed my blog, and every order kept the review gates on.
- Hermes Agent: nightly cron jobs and skills learned from corrections
Hermes runs nightly CLI updates, a security PR scan every 6 hours and a 30-minute autoheal job. Every correction I make becomes a skill file. Hermes drafts, I send.
- 9agent: run Claude Code, Pi or Hermes on any model with one command
A small launcher that points Claude Code, Pi or Hermes at a 9Router gateway, lets me pick any model, and can run the agent in Docker. It never rewrites configs.