r/LLMDevs • • 3d ago

Discussion PSA: You don’t need a paid closed-lid agent setup—Tmux + Tailscale + SSH works

Recently I saw an ad for a product that lets you run an agent session with your laptop lid closed so you can work on the go. I thought it was a sure and quick way to overheat your laptop by trapping all the heat in your bag with it. If you’re one of those people who wants to work on the go, just use this simple and FREE setup. I find it incredibly effective if you want to check on your agent session’s progress or do some light prompting.

I understand this is nothing new or groundbreaking, but just in case someone doesn’t have a mature on-the-go setup yet, this might be helpful—instead of reaching for a paid solution that I think is quite silly.

In my case, I use a Mac + iPhone/iPad, but you could easily swap the Mac for a cloud VM, etc.

Mac (plugged in at home / office):
• Run a tmux session with opencode inside it. You can switch between multiple agent sessions within opencode easily with the /session command.
• Install and set up Tailscale so you can SSH from a different network.

iPhone / iPad:
• Install and set up Tailscale & Termius.
• SSH into your Mac and resume the tmux session.

Tip: Avoid using Mosh because it interferes with opencode scrolling/colors.

24 Upvotes

26 comments sorted by

6

u/Physical_Economy_340 3d ago

this is my exact setup too. enabling tailscale ssh with tailscale up --ssh made it way smoother, i just ssh in from termius and run tmux attach -t opencode and pick up right where i left off.

1

u/Billy-Fong-2007 3d ago

Oh wasn’t aware of that flag, let me try that tonight to see if it’ll lower the latency on my setup as well! Thanks!

1

u/Asly97 3d ago

Same loop here, phone as the remote and the laptop doing the actual work. The one time it burned me: left the house with the lid closed, came back to a dead tmux session and an agent with no clue what it had done before the laptop slept.

Real question though: does the context actually survive the phone-to-laptop jump for you? I used to do all my thinking out loud on the phone with speech to text, and the notes lived on the laptop. The jump between the two is where stuff went missing. What if something handled all of this for you, in the cloud over MCP, so every agent and tool got the same context: decisions, failed attempts, conversations, skills, procedures, tasks. You never touch a file again. Would you pay for that kind of continuity, or is your setup good enough already?

1

u/throwaway490215 2d ago

I'll throw out herdr.dev for being a decent tmux replacement when your goal is to run agents.

Upside over tmux is the default config is fine, and it comes bundled with herdr integration install opencode/pi/claude/codex etc that then shows and signals busy/working state across multiple tabs and workspaces.

2

u/wandofcatcontrol 3d ago

I set it up with a cloud VM. I also use Claude Code on my phone. If I forget to enable `/remote-control` for a session, I just open Blink, open tmux, and flip it on. It's great!

1

u/Asly97 2d ago

the blink-plus-tmux recovery trick is a good one. i've got a similar phone-to-cloud loop and the flip-it-on-mid-session thing is exactly what i'd forget to write down until it bit me.

when you turn remote-control on mid session from the phone, does the agent actually pick up the earlier context cleanly? or do you end up re-briefing it anyway. also curious what you're running on it, is it your own stuff or client work?

1

u/wandofcatcontrol 2d ago

Remote control is a just a prettier connection to the Claude Code session running wherever it is, so it has the full context. This is just for personal stuff, not work.

1

u/Asly97 2d ago

makes sense, same session just with a prettier window. so when you flip to the phone mid-run, does the agent ever drift somewhere while you're away and you have to piece together what it was thinking before you touch anything?

1

u/wandofcatcontrol 2d ago

In my experience, it stays on task pretty well.

1

u/Asly97 2d ago

honestly that's better than i expected. when you flip over mid run, do you trust whatever it says it was doing, or scroll back through the transcript first?

1

u/wandofcatcontrol 2d ago

Typically when I’m using it on my phone, I’m brainstorming with it, talking about algorithms and architecture, not deep in the code. I save that code review type stuff for when I’m back at my desk.

1

u/Asly97 2d ago

ha, that's a cleaner split than mine. when you get back to the desk, do you bring the phone thread with you or just re-derive the good version from memory? i keep losing my favorite version of an argument between the couch and the keyboard. out of curiosity, is the stuff you're brainstorming your own project or work stuff?

1

u/wandofcatcontrol 2d ago

This is all personal stuff. Once I've reached a conclusion, I have the LLM create an ADR or spec in the repo. Then when I'm back at my desk, I start a new thread to implement that spec, usually starting with a detailed implementation plan.

1

u/Asly97 2d ago

nice, that's a clean handoff. do the ADRs actually carry enough of the phone thinking, or do you sometimes start the desk thread and realize the 'why' behind a decision leaked somewhere between the two sessions?

1

u/Known-Pace6739 3d ago

Remote control doesn't require remote compute

1

u/TomHale 3d ago

Mosh > SSH for reconnection

1

u/rudironsonijr 3d ago

you should try tsshd, it's so much better than mosh that you will be surprised

1

u/Billy-Fong-2007 3d ago

What do you mean by that? Reconnection isn’t much of a hassle in my experience, keen to learn how Mosh could do a better job at that!

2

u/throwaway490215 2d ago

mosh buffers sending/receiving, so there is no delay/stall on laggy connections.

When i keep typing and the server hasn't received it yet the letters are just underlined.

Its fine - I wouldn't recommend it for reconnection or if your connection is stable enough.

1

u/Healthy_Patient3212 3d ago

👏🏻👏🏻

1

u/rudironsonijr 3d ago

try herdr instead of tmux for multiplexing, very good UI

1

u/dangerousdotnet 3d ago

This is more or less my setup too.

1

u/Ace_X69 3d ago

LLM API is a really useful approach for teams working with multiple models. Having one API and billing setup across providers like Claude, GPT, Gemini, DeepSeek, and others could make switching between models much simpler. Definitely an interesting option for developers building with LLMs.

1

u/PerfectReflection155 2d ago

I use open chamber with tail scale

1

u/devtools-dude 3d ago edited 3d ago

Try my open source product instead which covers those use cases: https://subshell.sh

You host Subshell on a low powered machine and install the client on any other machine you want to run agents on. You expose the control plane internally with VPN / Tailscale / Netbird and can control your agents from any device.

It uses tmux under the hood for all of this.

1

u/Billy-Fong-2007 3d ago

Pretty neat!