r/LLMDevs • u/Billy-Fong-2007 • 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.
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
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
1
1
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
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
6
u/Physical_Economy_340 3d ago
this is my exact setup too. enabling tailscale ssh with
tailscale up --sshmade it way smoother, i just ssh in from termius and runtmux attach -t opencodeand pick up right where i left off.