A 25-minute walkthrough of running long-lived AI coding agents on a VPS by wrapping every session in tmux — so closing a laptop, killing an SSH connection, or losing power never interrupts a job that's supposed to run for 24 hours.
Posted
3 months ago
Duration
Format
Tutorial
educational
Views
8.2K
461 likes
57 · 43
Big Idea
The argument in one line.
Wrap every agent run in tmux on a VPS so the work survives a closed laptop, a dropped SSH connection, or a dead battery — your local machine becomes a viewport, not a host.
Who This Is For
Read if. Skip if.
READ IF YOU ARE…
A solo founder or indie developer running Codex, Claude Code, or Hermes for multi-hour `/goal` jobs and tired of leaving the laptop open and plugged in all night.
An AI engineer who has used SSH but never tmux and keeps losing agent sessions every time the connection drops.
A vibe coder who builds everything locally and wants the cheapest production-grade upgrade to running agents in parallel without a beefier machine.
Someone evaluating whether a $6–$12/month VPS is enough to host long-running agent workflows instead of paying for a 64 GB MacBook.
A team lead designing a multi-agent setup where agents need to read each other's terminal panes and share state.
SKIP IF…
You already run tmux daily on a remote box and know the difference between sessions, windows, and panes — most of the video is foundational.
You want a deep comparison between tmux and screen, Zellij, or Byobu — none of those are covered.
You need Kubernetes, Docker, or container orchestration — this is intentionally a single-VPS, single-user setup.
You're already comfortable with detached shells via nohup, systemd services, or `&` — the video is aimed at people who haven't internalized persistence yet.
TL;DR
The full version, fast.
Tmux is a terminal multiplexer that splits one terminal into multiple panes and, critically, keeps every session alive after you disconnect. The argument is that long-running AI agents — Codex `/goal`, Claude Code refactors, Hermes runs — need a host that never sleeps, which a laptop can't provide. The fix: rent a $6/month Hostinger VPS, SSH in, install tmux with one apt command, enable mouse mode, then create named sessions where each pane runs a different agent. Detaching with Ctrl-B then D leaves everything running on the server in Lithuania; you can reattach from a phone via Terminus or from any computer via fresh SSH. The video proves the point by killing the SSH mid-build and reconnecting to find a Svelte flight monitor still being built by Codex in YOLO mode. Three commands carry 90% of the value: `tmux new -s <name>`, Ctrl-B then % (or ") to split, Ctrl-B then D to detach.
Free for members
Chat with this breakdown — free.
Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.
Tmux as the substrate for agentic engineering — a terminal multiplexer that keeps sessions alive when you disconnect.
01:04 – 02:24
02 · The agentic engineer's setup
All the famous AI developers (Peter Steinberger, Mario Zechner) run tmux on a VPS. Promise: this video will get you there in 20 minutes.
02:24 – 03:50
03 · Install tmux locally with brew
The simplest local install on macOS: `brew install tmux`, then check the version. On Windows or Linux, ask ChatGPT or Claude for the equivalent.
03:50 – 05:20
04 · First session and the detach magic
`tmux new -s subscribe`, start a `ping google.com`, detach with Ctrl-B then D, do other work, reattach — the ping is still running. The core mental model lands here.
05:20 – 07:03
05 · Sessions, windows, panes — and why it works
Three building blocks: sessions wrap windows wrap panes. Tmux persists, spawns, reads, and writes terminal sessions programmatically, which is why multi-agent setups need it.
07:03 – 10:05
06 · Get a Hostinger VPS
KVM-2 plan, 24-month billing for the biggest discount, coupon `david` for an extra 10% off. Pick a server location, complete checkout, land in the Hostinger panel.
10:05 – 12:40
07 · SSH into the VPS
Copy the SSH command from Hostinger, reset the root password if you lost it, paste, log in. Everything from here runs on the server in Lithuania.
12:40 – 14:35
08 · Install tmux on the VPS and enable mouse support
`apt update`, `apt install tmux`, then the non-negotiable `echo set -g mouse on >> ~/.tmux.conf` — without mouse support tmux is unusable for most people.
14:35 – 18:00
09 · Splitting panes and running first agents
Start `tmux new -s agents`, run `top`, split with Ctrl-B % and Ctrl-B ". Detach with Ctrl-B D. Kill everything with `tmux kill-server`. Then install Codex CLI from the docs.
18:00 – 22:00
10 · Codex /yolo and the /goal feature
Launch `codex --yolo` in multiple panes. Demo `/goal`: build a full-stack Svelte+Vite flight monitor end-to-end. This run is designed to last 5–15 minutes minimum.
22:00 – 26:05
11 · Install Claude Code and run mixed agents
One-liner install for Claude Code CLI, authenticate against a Claude subscription, run `/model` to pick Opus. Now multiple Codex and Claude Code agents run side by side.
26:05 – 29:56
12 · Multi-agent orchestration in tmux
Multiple Codex YOLO panes building different features, a Claude Code pane acting as the explainer/advisor. Detach and start another session for a 3D web game in parallel.
29:56 – 33:44
13 · Why this is non-negotiable
Closed laptop, dead internet, low memory — agents keep running on the VPS. Everyone in 2026 will have to adopt this pattern or fall behind.
33:44 – 22:20
14 · Kill the SSH, reconnect, prove the point
Disconnect entirely, open a fresh terminal, SSH back in, run `tmux ls` — sessions are still there. Reattach: the Svelte flight monitor is still being built.
22:20 – 24:10
15 · View the running app via SSH tunnel
Run `npm run dev -- --host 0.0.0.0` in the VPS pane, open an SSH tunnel from the MacBook, browse to the IP+port — the flight monitor renders live.
24:10 – 25:38
16 · Closing argument and CTA
Tmux + VPS is the future of agent work. Total setup is 40–60 minutes the first time. Hostinger affiliate is the first description link; the free terminal-commands bundle is the second.
Atomic Insights
Lines worth screenshotting.
Tmux sessions survive SSH disconnects, so a `/goal` workflow that needs 24 hours can run on a VPS even when your laptop is closed in a bag.
A $6/month KVM-2 VPS from Hostinger is enough to run multiple Codex and Claude Code agents in parallel — you don't need a $4,000 MacBook to do agentic work.
Three building blocks define tmux: sessions wrap windows, windows are tabs, panes are split screens inside one window.
Ctrl-B is the leader key for every tmux shortcut — you press and release it, then press the next key. Trying to chord it is the most common beginner mistake.
Without mouse support enabled (`set -g mouse on`), you cannot scroll, click, or select inside tmux — most people give up here before they realize the fix is one config line.
Tmux can persist, spawn, read, and write terminal sessions programmatically — which is what lets multi-agent systems pipe output between panes.
When you copy text inside a tmux pane, hold Option (Mac) or Shift (Linux) while selecting — otherwise tmux intercepts the selection.
Codex with the `/goal` flag is designed for hours-long autonomous runs; running it locally means accepting that your laptop has to stay awake the entire time.
`tmux ls` lists every session by name — if you forget which session your agent is in, this is how you find it.
`tmux kill-server` is the nuclear option: it terminates every session, every window, every pane in one command.
Run any installer inside a tmux session, not outside — if the SSH drops during a 10-minute install, the install dies with it.
Apps like Terminus on iPhone let you reattach to tmux sessions from your phone, which means you can check on an agent run while away from your computer.
Codex `/goal` can run for 24+ hours pursuing a single end-state — locally that's impractical, on a VPS it's the default mode of operation.
Hermes, OpenCode, Pyre, and other open-source agents are built by people who all use tmux on a VPS — the pattern is already standard in the agentic-engineering community.
Takeaway
How to make AI agents survive a closed laptop.
WHAT TO LEARN
The leverage isn't in tmux itself — it's in moving every long-running agent off your laptop and onto a $6 VPS so the work continues whether you're awake, online, or even alive at your desk.
Rent a Hostinger KVM-2 VPS for $6/month — it's enough RAM to run multiple Codex and Claude Code agents in parallel, and it stays online 24/7 so nothing dies when your laptop sleeps.
SSH into the VPS, then immediately install tmux with `apt install tmux` and enable mouse support with `echo set -g mouse on >> ~/.tmux.conf` — without mouse mode you can't even scroll, which is what kills most beginners.
Memorize three commands and you're 90% productive: `tmux new -s <name>` to start a named session, Ctrl-B then % or " to split into panes, Ctrl-B then D to detach without killing anything.
Run every installer inside tmux, not outside — if the SSH drops during a 10-minute install, the install dies with the connection unless tmux is holding it.
Launch agents with `codex --yolo` or `claude --dangerously-skip-permissions` in separate panes so they can take actions without per-command confirmation — only safe because the VPS is isolated from your real machine.
Use Codex `/goal` for hours-long autonomous runs: state the end state (database integrated, deployed to Cloudflare, 20 features with tests) and let it grind for 24 hours while you're at the gym.
When you finish a work session, type Ctrl-B then D to detach — never `exit` — so every running agent stays alive on the server for your next reattach.
Reattach from any device: `tmux attach -t <name>` from a fresh laptop SSH, or install Terminus on your iPhone to check on agents from the train.
Use SSH tunneling (`ssh -L 5173:localhost:5173 root@<ip>`) to view the in-progress web app the agent is building — your browser at localhost:5173 talks to the Vite dev server on the VPS.
When you copy text from inside tmux, hold Option on Mac (or Shift on Linux) while selecting — otherwise tmux intercepts the selection and the clipboard stays empty.
Treat `tmux ls` as your dashboard — it's the canonical answer to "which agents am I still running, and what did I name them?"
Avoid `tmux kill-server` unless you actually want everything gone — it's the equivalent of unplugging a server rack, and there's no undo.
Glossary
Terms worth knowing.
Tmux
A terminal multiplexer that lets one terminal window run multiple shell sessions in panes and windows, with the key property that sessions persist even when you disconnect.
VPS
Virtual private server — a slice of a remote machine you rent monthly, accessible over SSH, that stays online 24/7 so anything you run on it survives your local machine sleeping or losing power.
SSH
Secure Shell — the protocol you use to log into a remote server's terminal from your own machine. Once connected, every command you type runs on the remote box, not your laptop.
Session
In tmux, the outermost workspace — a named container holding any number of windows and panes. You attach to a session by name and detach without killing it.
Window
In tmux, a tab inside a session. Each window can be split into multiple panes. Useful for grouping related agents or workflows.
Pane
In tmux, a split-screen region inside a window — each pane runs its own shell. You create panes by splitting horizontally (Ctrl-B %) or vertically (Ctrl-B ").
Detach
Disconnecting from a tmux session without stopping it. Ctrl-B then D leaves every process running on the server, ready for you to reattach later.
Reattach
Reconnecting to a previously detached tmux session via `tmux attach -t <name>`. The shell looks exactly as you left it, with all output and running processes intact.
/goal
A Codex CLI mode that runs an autonomous loop pursuing a stated end-state for many hours, useful for whole-feature builds that would otherwise need constant human prompting.
YOLO mode
Codex's `--yolo` flag (and Claude Code's `--dangerously-skip-permissions`) that lets the agent run shell commands and edit files without asking permission at each step — only safe inside an isolated VPS sandbox.
Mouse support
A tmux setting (`set -g mouse on`) that enables clicking between panes and scrolling inside them with your mouse — off by default, but essentially required for anyone who isn't a keyboard-only Linux purist.
Codex CLI
OpenAI's command-line coding agent, accessible after authenticating with a ChatGPT account or API key.
Claude Code
Anthropic's CLI coding agent, invoked with `claude` and authenticated against a Claude subscription, console account, or API key.
Hermes
An open-source agentic coding system, mentioned as another long-running agent that benefits from a tmux/VPS setup.
Terminus
An iOS/iPad SSH client that supports tmux session reattachment from a phone — referenced as the canonical way to check on a running agent when you're away from your computer.
Resources
Things they pointed at.
07:08productHostinger VPS
09:00productHostinger coupon code DAVID (extra 10% off)
“Tmux is the one tool that every single agentic engineer needs.”
Twelve-word thesis. Strongest possible cold-open.→ TikTok hook↗ Tweet quote
01:11
“Most vibe coders develop all their apps locally on their laptop. Agentic engineers use tmux on a VPS to run multiple agents for hours, sometimes days.”
Sharp us-vs-them frame in one sentence.→ X / LinkedIn pull-quote↗ Tweet quote
29:56
“If my Internet gets disconnected, my agents keep running. If my laptop runs out of memory, my agents keep running. If I need to close my laptop, the agents keep running.”
Three-beat structural payoff for the entire setup.→ IG reel cold open↗ Tweet quote
32:45
“Tmux on a VPS is non-negotiable. I'm certain of it. Everybody in 2026 will have to adopt this or just not be as effective.”
Dated, opinionated, screenshot-friendly.→ X / LinkedIn pull-quote↗ Tweet quote
24:12
“This is the beauty of tmux — persistence and the multi-agent. Really, it's essential.”
Two-word summary of the whole video.→ newsletter pull-quote↗ Tweet quote
24:08
“Even if my MacBook literally gets shredded to pieces, even if it explodes, it will still keep running.”
Memorable hyperbole that lands the persistence argument.→ TikTok hook↗ Tweet quote
24:10
“This is the future. Running tmux on a VPS, you SSH into it.”
Definitive close — works as a one-line summary anywhere.→ X / LinkedIn pull-quote↗ Tweet quote
24:15
“Most vibe coders are completely scared of tmux. They don't know what it does. They don't know how to set it up. They don't have a VPS.”
Identifies the avatar directly — perfect for a paywalled course pitch.→ IG reel cold open↗ Tweet quote
The Script
Word for word.
Read-along
Don't just watch it. Burn it in.
See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.
17px
metaphoranalogy
TMux is the one tool that every single agentic engineer needs. Now what even is TMux? TMux stands for terminal multiplexer, aka a tool that lets you run multiple terminals at once.
But that's not all. The thing that makes it essential for AI agents is that it keeps your terminal alive even when you disconnect. So if your laptop dies, runs off of battery, if you wanna run slash goal in Hermes or Codex, or if you're doing a large refactor, all of these require your agent to run for multiple hours.
Without Tmax, you really cannot do that. So if you're using Clothecode, Codex, Hermes, Py, or any other agent and you don't have TMux, you really are missing out. Now here's where it gets really op.
While most vibe coders develop all their apps and projects locally on their MacBook, on their laptop, AgenTeq engineers use TMax running on a VPS to run multiple different agents at once for hours, sometimes days at a time. And by the way, all of the famous AI developers like Peter Steinberger, the creator of OpenClaw, or Mario Zechner, the creator of Pyre.
All of them do this. So I would highly recommend you block out the next twenty minutes, sit down, and actually learn TMax. First, let me show you how to set it up locally so you get a taste of the power of TMax, but then I'm gonna show you the real deal, which is t max on a VPS and then SSH into VPS.
Let me not get ahead of myself because I don't wanna overwhelm you. So first, open up a terminal. Any terminal is fine.
If you're on Mac OS, you can use brew. But, basically, the way to install t max is very simple. Just type in brew, install t max.
Boom. Just like that. And by the way, if you get stuck at any point in this video, just ask Chargibt or Clot.
For example, let's say you're not on macOS and you're getting confused. Well, I'll show you how to solve that. Right?
Boom. You take a screenshot of what I'm showing and you paste it into Cloth or into CherryGPT and say, help me set it up on Windows. I'm not on Mac OS.
How do I actually install this? Be very concise. So don't make excuses.
As long as you can speak English and have a Internet connection, you can absolutely do this. Let me jump back into the terminal, and then I'm gonna do clear and the t max dash v. Okay.
We have the t max version. Beautiful. Let's do clear.
And now I'm gonna give you the main command you have to know to start a new session inside of t max, which is t max new dash s and then the name of the session. So that could be testing or, you know, YouTube or subscribe. If you're watching this and you want more of these technical videos, make sure to subscribe.
And boom. Here we are. You can see this green bar at the bottom.
When you see it, that's how you know you're inside of TMux. What that means is that we can run a command, for example, like ping google.com, which obviously will keep running and pinging Google.
And then we can do the main keyboard shortcut, which is command b and d. This will allow us to detach. You can see detach, and we're back in the terminal, and we can do something else.
For example, like p w d and any other command. We can launch Clothcode, do whatever we want, but the magic is that session is still running inside of TMux.
So when I kill Cloud Code here and I do clear, I can do TMux attach dash t and the name of the session which was subscribed, and boom. Here we are back. It's still pinging Google, still the same terminal session.
It wasn't killed. So this is really the magic of TMux, and, obviously, it can do a lot more. For example, I am gonna show you here.
Little sneak peek, you know, splitting it into two. We can, you know, do a lot of fancy stuff inside of TMux, all of which I'm gonna show you in this video. But the main idea is that these sessions are persistent.
You can detach from them. You can reattach from them, and you can use this to manage multiple agents at once, which makes it ideal for the era of agentic engineering. Now when you want to close a TMax session, just type in exit and then close the pane.
So I'm gonna do control c to stop this Google ping and do exit to exit out of TMax. And to see all of your active sessions, just do TMax LS, and you can see that no server is running right now because we exited everything. Now to understand TMax, you have to understand these three essential building blocks, sessions, windows, and panes.
And I think this graphic really explains it the We have the TMac session, which kinda wraps everything. Inside of a session, you can have different windows, and in each window, you can have different panes. A session is the whole workspace.
Windows are like tabs in a browser, and panes are split screens inside of a single window. Now the reason this works is because TMacs can persist, spawn, read, and write terminal sessions programmatically. This gives the agents the powers to read other panes.
Otherwise, if you have two separate terminals, the agent cannot access the other terminal. But if you're using TMax, agents can see what the Azure agents are doing if they need to see it. So, basically, you can think of it as the substrate that the whole multi agent setup stands on.
Okay. So I gave you a little teaser of how simple it is to install TMux locally and run it on a MacBook, but the real power is using it with a VPS where these agents are all running on a VPS so you can have the most shit computer possible with, like, two gigs of RAM. All you need to do is SSH into the VPS.
You can run Cloth, Code, Codex, PIE, Cursor, CLI, OpenCode, anything you want on the VPS itself, and you can SSH through it through your MacBook, from your phone, and all the development is happening on the VPS inside of TMux. This is what all the top people are doing in AI development. I'm gonna show you how to do the same.
So the first thing we need is a VPS. Now, personally, I run all of my VPS servers on Hostinger. It's one of the most affordable options, and it's super easy to set up.
So I'm gonna leave a link to Hostinger below the video. Just click on this landing page, then click on choose plan and select KVM two. This is more than enough to run multiple AI agents in parallel.
So here inside of the cart, make sure to select the period. I recommend going for twenty four months because every month that goes by, I have more and more VPSs, so that gives you the biggest discount. But, also, if you want an even bigger discount, go to the right and click on have a coupon code and type in code david.
Hostinger was kind enough to sponsor this video. So if you use the code david, you get additional 10% off from your VPS. Then on the left, we can select a server location that's close to you and click on continue.
This will redirect you to the checkout page, so the last thing that remains is filling out your credit card details and completing the payment. Now once you complete the purchase, you'll be redirected to your Hostinger panel where you can see everything about the VPS. If you don't see the screen on the left, you can click on VPS, select the one you just purchased right here, and click on overview.
Here you can see all the stats, CPU, usage, memory, all that stuff. But what we are interested in is the SSH access. And, again, SSH is one of these terms that can be complicated.
It definitely sounds intimidating if it's your first time using it, but all that means is accessing your VPS through your MacBook. Okay? So your computer, you just access your virtual private server.
That's it. SSH is the protocol that allows us to do that. So what you need to do is copy this command, literally click on this button right here, open up your terminal, paste this in.
It's gonna ask for the root password. If you didn't save that, which you should definitely save that during setup, but if you didn't, don't worry. Just click on here.
You can easily change it, generate a secure one. Boom. Of course, do not share this with anybody.
Otherwise, they can just access your VPS. So make sure to store this securely and click on confirm. And within couple of seconds, Hostinger will change your root password.
So when you go into the terminal and you click in, paste it in, boom. Here we go. We are logged in into our VPS, SSH'd from my MacBook.
Right? So I can control the virtual private server, but everything will be happening on this server on Lithuania. So even if my MacBook explodes, doesn't matter.
All the agentic development is happening on the server, and I can connect from a new device from my phone. There's apps like Terminus, which if you want me to make a video on that, make sure to comment below. But this is the beauty of having a VPS.
You eliminate the risk. You put everything on the server. You don't drain battery of your computer, and you can run heavy operations that would require an expensive computer.
So if you don't have one, this is the way. But this is the way no matter what because more and more agents are running for hours. Last year, you know, the longest agent ran for, like, five, ten minutes.
Now with features like slash goal inside of Codex and Hermes, agents can run for days, and you would have to keep your laptop or or computer powered on and awake for all that time. Otherwise, it interrupts. That's obviously very inefficient.
So instead, we're gonna use t max on a VPS, SSH interrupt VPS, and run all of our development on there. So the first thing you wanna do is type in t max dash v to test if you already have t max. As you can see, we do, which is beautiful.
It saves us some time. I think it comes preconfigured on Hostinger. But if you don't, I'm gonna show you how to install it.
Type in a p t update to make sure you have the latest version. We can do clear and type in a p t install t mux, and this will install t mux on your Ubuntu Linux VPS.
Clear. Do t mux dash v, and as you can see, we have version 3.4.
Now the next command you absolutely must run, nonnegotiable, and that is to enable mouse support. So run this command echo set g mouse on.
I know it's a pretty complex command. That's why everything from this video, I packaged it into a single bundle that you can just click. It's gonna be the second link below the video, and you can get all the terminal commands, all the presets, everything I'm gonna show you in this video completely for free.
So, again, it's the second link below the video. Go grab it now. Okay.
So we can type clear again, and we can start our first TMax session, TMax new dash s agents. You can name it agents. There we go.
We can see the name right here at the bottom, and we can actually start doing some of the multiplexing, you know, using it to run multiple terminals at once. So for example, here we can do top to just get bunch of data about our VPS, Then we can do control b and then percentage. This will split it horizontally.
Right? So, again, control b is the main command inside of TMux. The tricky part is that you have to let go after you run it.
Okay? So it's not control b percentage. It's control b, let go, and then press percentage.
Another thing you need to know is control b quotation. This will split it vertically. Right?
So same thing. Control b to activate the shortcut and then quotation to split it.
So here I can do, like, ping one one one one. This is the public Cloudflare server. And then if I want split it vertically, I can do control b quotation and have another terminal here, and I can do something else.
You know? Pinggoogle.com. Boom.
And and with the mouse support, we can click around actually and, you know, split these terminals, and you you can do this on multiple levels. You can do control b percentage again. And look look at this.
Look how many terminals we have running. Right? Isn't this beautiful?
This is the magic of TMax. Also, can do exit to exit any of them. Right?
So we can keep splitting indefinitely, basically.
Boom. Control b percentage. And, yeah, each of these could be separate AI agent.
Now we haven't installed any agent so far, so that is gonna be the next step. Installing Clothecode and Codec CLI on our VPS so that we're not just running some pings, but these are actual agents doing actual development work. So let me show you how to do that right now.
So to install Codec CLI, just type in Codec CLI and click on the open AI developers link. It's literally a single command.
So just copy that. Boom. Back to terminal.
We can actually exit some of these so we don't have so much mess. This is why you enable the mouse support because without that, you actually cannot click. You have to do control b and arrows.
It's very annoying. With mouse support, it's much easier. Also, another thing, we can do control b detach.
Right? So control b and d. And then if you wanna kill everything, that's t max kill server.
So, actually, before I run that, I'm gonna do t max l s. It's gonna see, okay, agents one window, and, obviously, we can reattach, attach dot t agents, and we're back in.
Beautiful. Just like that. But if you wanna kill everything, just it's kill server.
Tmax kill server. Boom. And now we do Tmax LS to list out everything.
Nothing is running. Beautiful. So now just paste in the command from OpenAI docs to install Codec CLI.
Let's run that. And it's especially powerful. I'm gonna show you ClosedCool as well, but, like, Codec CLI with the slash goal feature has been made for this.
You really need a VPS to run this effectively because, otherwise, you need to keep your laptop or PC up at all times. Not just turned on, but awake. It cannot, you know, power off.
It cannot be closed, all that stuff. So let's launch codex. So this is what it's gonna look like for you when you do it for the first time.
Right? You type in codex, then you have three options, ChaiGPT device code and API key. Easiest is device code.
I'm gonna click that, and then we need to copy this. Right? Copy this link that the terminal gives you.
Go into your browser and then paste that in, and then you need to just log in to your ChaiGPT account. Alright. This is requiring two f a.
Okay. Let's put that in. Boom.
Now I'm gonna select my personal account because I have a ChadGBT pro plan, the 200 a month, which is more than a team plan. But, honestly, it doesn't matter.
Just make sure you have any paid plan. And then back to the terminal, we have this nine digit code. Copy that.
Paste it in. And we should be good. If we check here, we should be logged in.
There we are. Okay. So hit enter.
The first thing is to select the model, obviously. Right? The model, g p d 5.5 medium, that's a good baseline, and make sure to do slash fast so that it is 1.5 speed and send a test message, and it's working.
Okay? So what we can do is to control c to kill this. We can do t max, new session, maybe we can name it test.
As you can see, the green bar at the bottom means that we are inside of t max, and I'm gonna do codex dash dash yellow to launch a codex.
Then I'm gonna do control b percentage to split the t max. There we go.
And we can launch another one, codex dash dash yellow. And now you can feel the power. Right?
You can have these codexes work on the same project, different features, or different projects. Now let's say I click in here, hey, and I'll do control b quotation marks, and we split it vertically. So here I can do another codex.
Boom. Boom. And this is how you run multiple agents on a VPS persistently.
So I can do slash goal and say, build a full stack web app that is a clone of reddit.com, but built for AI agents, blah blah blah.
Whatever you wanna do. Right? And this goal, it will run for hours.
Maybe you can set a better end end state. The end state should have all features with unit tests, and it should be, you know, including integrated database deployed on Cloudflare, whatever you wanna do as the end state.
But this slash goal feature can easily run for twenty four hours. If you wanted to do this locally, you would have to have your computer up for twenty four hours, which is very unrealistic, and it would be eating your battery.
It would be distracting you. You have to keep it open. You cannot accidentally close the tab.
With t max, you can have multiple agents running at all times, and the best part is you can detach. So you can still use the same terminal. Command p d, and I'm detached.
And I can still, you know, do, like, l s, you know, figure out what's there. PWE or come on the root level. I can see, you know, what's on the VPs.
I can c d. I can make a directory. You know?
Mm-mm. YouTube. I can c d into YouTube.
You know? And you can do whatever you want on the same BPS, and then always to t max l s. You can see, okay.
It's named test. If you forget their name, that's helpful. You know?
You can do t max l s to see the name of that session, and that's t max attach dash t test, and we're back in. And these agents will be running. That's the beautiful part.
Now let's install Clothecode so you feel the power of having different agents running into t mux at all times. So just go to Google. Type in Clothecode install.
Clothecode CLI install. There it is. Click the first link.
They also have a one liner installer, so just copy that. Back into terminal. Again, the detach, control b d.
You need to learn this. Okay? You need to learn that command, control b d.
It's essential. Paste that in. It's gonna install a Cloth Code CLI.
And, And, actually, while this is installing, I should have run it inside of a t mux. That's a rookie mistake. Anyways, what we can do actually is I'm gonna do the same command that we just ran to attach into test, and I'm I'm gonna start this.
Create a new deer named web app, and in there, build a full stack web app with Svelte plus Vite that is for monitoring flights using some free public API.
Build the full thing end to end.
So this is gonna be running for five, ten, fifteen minutes. I don't know. But in the meantime, we can just do control b d, and we can continue using the same terminal because it's running itself t max.
So we do t max l x. We're gonna see that it's running, and then in the meantime, we can continue with the Cloth co install. So I'm gonna do Cloth, and we need to authenticate the same way we just did with Codec CLI.
So with the subscription, console account, third and party platform. I'm just gonna go subscription. It's probably the easiest.
Obviously, you don't have cloud subscription, use the API or something. Boom. Paste that into our browser here.
Authorize. Need to copy this code. Paste that here, and we should be good.
Enter. Enter. Enter.
And we're here. Let's do slash model to select model we want. Okay.
Opus is by default. Let's send a message. Hey.
There we go. So that's how easy it was to install both Codec CLI and ClosedCode CLI, but we're not interested in this. What we're interested in is running TMax.
So let's do again Tmax attach dash t test. As you can see, this agent is running. It did a bunch of stuff in the meantime.
Also, by the way, the reason you need to do the mouse command, which, again, is gonna be in the bundle with everything else shown in the video, go get that. It's the second link below the video. It's completely free, so get it.
I'm gonna email you all that stuff, including the mouse link because you need to enable a mouse. Without that, you cannot scroll. You can't even scroll on Tmax.
You have to do everything by hand as these, like, try hard DevOps experts who have mastered every single Linux shortcut do. I mean, shout out to them because without them, tools like this wouldn't exist, but, you know, we're not as cracked as them. I still wanna use my mouse to just click around and scroll around, so definitely enable that command.
But as you can see, this agent has been running, and we can, you know, maybe kill this one, control c, and instead do cloth dash dash dangerously skip permissions. It cannot be just whatever.
Just normal cloth. And we can say, run l s and tell me all the dears we have.
And we can have this development running on the VPS permanently even when I close my laptop. And, we can use apps like Terminus. If you don't have Terminus on your iPhone, definitely get it.
It allows you to SSH into your VPSs and manage them through your phone. So, you know, if you have, like, a Hermes agent running or OpenClaw running and they crash, sometimes you're not on your computer. Right?
So you can easily fix them from your phone if you have Terminus. But the main thing is you need a VPS. If you don't have a VPS, you cannot SSH into it.
So really moving more and more of your stuff, your your information, your agents, your development work onto a VPS is the future. So you either wait until it's obvious and then you're gonna be the last mover, or you do it now and you're one of the first movers because most people still don't know how to use it, especially vibe coders.
And stuff like this is really the difference between vibe coders and enchanting engineers. People who actually embrace software, they embrace all the tools that exist, and they have the best possible setup to get the most work done in any given minute. You don't wanna be using ineffective tools.
Right? And, again, this is running on our VPS and it's building the app. You can see that we have the web app.
So I'm gonna say, go into the web app and explain what the state is. Be concise. Yeah.
So you can run a cloth code here. That's like more of a explainer adviser consultant. You can run multiple coexes that are building different features.
You can click here. Maybe this guy is, you know, lazy, so you can do a definite another section here. Cloth.
Okay. Maybe maybe this one is kinda weird. You don't like this LAI, so you can exit that and do control b percentage to split it horizontally and do a clot here.
And this one, maybe it's taking up too much space, so I'm gonna do control b quotation mark, and maybe we can run another codex YOLO here. And this is the beauty of Tmax. You can run many agents at once in a clean user interface with easy switching.
And if you need to detach, command b d, boom, detach. And I can start another TMax session. I can do TMax new dash s and maybe do a different web app.
Maybe this can be a three d game. Okay. And now here we're gonna do another codex yolo.
Let's actually do It's the cloth, and I'm gonna do create a new deer named game and build a nice three d web game in a single HTML file.
And then I'm gonna do command p d, detach from this, I'm gonna do t max l s. We can see all of our sessions. We have three d game.
We have test. So I'm gonna do attach to the test one, see how this development is going.
Okay. This guy is still running. Four minutes thirty.
Uh, this guy already explained it. Let's see what's happening. It's real working.
Okay. We need to run it, improve the docs, command b d, detach from it.
We can do clear, t mux attach dash t, three d game. Let's see how this is going.
It's still brainstorming, thinking some more. That's a new feature in Cloud Code.
Alright. So, obviously, we haven't launched with dangerous escape permission, so that's why it's asking for everything. But, yeah, you get the point.
We have development running on a VPS. My MacBook is running smoothly. You know?
I can open up activity monitor. My memory is probably very low. I mean, I'm recording with OBS, that is gonna be taking up some time.
But, you know, my battery is fine. If I was in a cafe and and wasn't connected to charging, this would be a complete game changer.
My battery wouldn't run out. Everything's running on a VPS. If my Internet gets disconnected, my agents keep running.
If my laptop runs out of memory, my agents keep running. If I need to close my laptop, the agents keep running. There is a massive difference between people who don't use t max and who do use t max.
T max on a VPS is nonnegotiable. I'm certain of it. And, uh, everybody in 2026 will have to adopt this or just not be as effective.
Now let me show you the biggest thing, and that is completely killing the SSH. Right? So I'm gonna kill this to prove the point.
I disconnected. So I'm on my MacBook, okay, on my desktop. I'm gonna launch a new terminal.
I'm not even SSHed. So back to Hostinger panel. I'm gonna copy this again.
Boom. Run it. I forgot the password to be fair, so I'm gonna reset it.
Boom. Reset. Put that in.
Let's do clear. This is completely fresh SSH. I killed everything, killed the connection, but we can do t max l s.
Oh, and we have sessions running. This is the beauty of t max, persistence and the multi agent, right, in the in the user interface.
Really, this is a it's essential. So now we can do, again, the TMax attach dash t test, and we're back. Even though I completely killed the SSH, we can see that the app is running here.
PMReal. Okay. Flights.
Okay. So I can ask, how can I see this app? I'm SSHed into this VPS via my MacBook.
I'm gonna give it the command. Here is the IP. Boom.
Give me step by step. Be very concise. On the VPS, run this.
Okay. So, actually, we can we can easily do it here. Let me let me click here.
We can reuse some of these terminals. What is it? Yes.
Allow. This cloud core is useless. I'm gonna control c to kill it, but I'm gonna run it here.
CD root web app. Let's copy that. CD slash root web app.
What do we need do? NPM run dev dash dash dash dash host zero zero zero zero.
There we go. And then, uh, on the we need to run a on a MacBook command. So I'm gonna do control n to open a new terminal like this.
And just copy this command. Okay.
It's not copying. Now one caveat is when you copy something, you need to hold option while you select it to bypass the TMUX selecting. Okay.
So then we have to go to this IP address and the port five one seven three because it's a wide app. Five one seven three and just h t t p before this. Okay?
HTTP colon dash dash, and this should work. SSH tunnel.
So it needs the IP. So let's go back to hosting the panel, give it IP. Here is the IP.
Give me the updated command. There we go.
Let's run it here. Needs the password. Let's give it that.
So and then we can go new browser tab. And here is our flight monitor built fully on a VPS. Look at it.
And we can keep developing it. Right? So let's go back into TMax.
And all of this was built on the VPS by agents running inside of TMax sessions, and now I can access it from anywhere. Right? We can push it to GitHub.
We can deploy it to Vercel, to Cloudflare, add a super base back end, whatever we wanna do. But the main thing is, if I run a massive refactor like slash goal, refactor the front end to be like Balantir UI, UX, keep going until we have 20 plus working features all using OSS APIs for different global, we could say, like, geopolitical data.
Boom. It's gonna be pursuing this goal for many hours, developing our app and I can do whatever I want.
I can go for a walk, I can go to the gym, I can go grab a coffee, and this development is happening. Even if my MacBook literally gets shredded to pieces, even if it explodes, it will still keep running because it's on the hostinger VPS somewhere in Lithuania and the Codex will keep cooking on that app and the app is gonna be developed.
This is the future. Running t max on a VPS, you SSH into it. I know there is a lot of different terminology, but as you can see, it wasn't that complex.
We were able to install TMax and Cloth Cloth Code very quickly.
We were able to set up a new VPS very quickly. I mean, hosting rates are easy. Codex CLI installation Cloth Code CLI installation was also very easy when you have the subscriptions.
If you don't have the subscriptions, why? It's $20.26.
You just get a subscription on any AI tool. All of this can be set up within forty minutes, maybe sixty minutes if it is your first time. So now that you've watched this video, go ahead and actually do it.
Because watching is useless before action. So this will already put you ahead of 99.9% of people.
Most vibe coders have nothing even close to this. They're completely scared of Tmax. They don't know what it does.
They don't know how to set it up. They don't have a VPS. They're developing everything locally, just confused.
If they close their laptop, all the all their development stops. Their agents aren't running for multipliers persistently on a goal. They don't even know what the slash goal feature is.
Right? Whether it's inside of Hermes. When and even Clothcore has its slash goal.
Right? You and we can say, like, build a new three d game shooter end to end. And all of this can be running on a single VPS.
The whole the KVM two plan from all stinker is more than strong enough. And, again, if you don't have your own VPS, use the first link below the video. Get your VPS today because it's essential.
No matter if you're running your automations, your agents, your deploy you can deploy your full stack web app on hosting VPS.
You can do anything with a virtual private server. Store your files there. It's basically a computer that you don't have to worry about.
It's managed somewhere that lives in a data center, and, you know, it's a virtual private server. That's what it is. So even if you're not a DevOps expert, even if you're not a developer, grab yourself a VPS and start using TMax with multiple agents, building your software for hours at a time even while you sleep.
Oh, and again, all of the resources, terminal commands, everything I showed from the video is bundled below. It's the second link in the description. So if you want this, go get it.
It's completely free.
The Hook
The bait, then the rug-pull.
David Ondrej opens cold: "Tmux is the one tool that every single agentic engineer needs." By the four-minute mark he's split a single terminal into a dozen panes, each one ready to host its own Codex or Claude Code agent. The hidden promise is bigger than tmux itself — it's that you can rent a $6/month VPS and let a Svelte app build itself overnight while your laptop sleeps in another room.
Frameworks
Named ideas worth stealing.
04:23model
The three tmux building blocks
Session — the named workspace that wraps everything; you attach to it by name
Window — like a tab in a browser; one session can hold many windows
Pane — split-screen region inside a window; each pane runs its own shell
The mental model you need before any of the keyboard shortcuts make sense.
Steal forany explanation of a multiplexer, container runtime, or hierarchical workspace tool
14:35list
The minimum tmux keymap to be productive
tmux new -s <name> — create a new named session
Ctrl-B then D — detach without killing anything
tmux attach -t <name> — reattach to a session by name
tmux ls — list every active session
Ctrl-B then % — split pane horizontally (left/right)
Ctrl-B then " — split pane vertically (top/bottom)
tmux kill-server — nuke every session
Seven commands cover 90% of daily tmux use.
Steal forany cheat sheet aimed at a tool that has 200 features but 5 daily ones
Tmux — persistent multiplexer wrapping every agent run
Codex CLI / Claude Code / Hermes — the agents themselves, one per pane
Terminus on iPhone — reattach from anywhere, even without a laptop
The five-layer stack that lets a single operator run multiple long-running agents without keeping a laptop awake.
Steal forany setup guide for someone migrating from local-only dev to a remote-first workflow
06:00concept
Why tmux is the substrate, not the surface
Tmux exposes a programmatic API to persist, spawn, read, and write terminal sessions. That's what lets one agent read another agent's pane output — without it, multi-agent setups can't share state through the shell.
Steal forexplaining why a primitive matters even when you don't interact with it directly
CTA Breakdown
How they asked for the click.
VERBAL ASK
25:05link
“If you don't have your own VPS, use the first link below the video. Get your VPS today because it's essential. All of the resources, terminal commands, everything I showed from the video is bundled below — the second link in the description, completely free.”
Two-tier CTA. The hard pitch is the Hostinger affiliate (first link) with coupon DAVID. The soft pitch is a free terminal-commands bundle gated behind an email opt-in (second link). The affiliate revenue covers the production cost; the email list compounds the audience.
FROM THE DESCRIPTION
PRIMARY CTAWhere the creator wants you to go next.
A two-host deep dive on why self-hosting open-source AI is a freedom fight, not just a cost play — covering hardware tiers, model benchmarks, geopolitical risk, and the case for owning your inference stack.
A week of AI-agent news: Codex takes over iMessage, GrokBot draws Claude-Code-moment comparisons, Anthropic ships /design and mobile Cowork, and Slack gives agents their own channels.