Modern Creator
David Ondrej · YouTube

Build Anything with Tmux, Here's How

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
yesterday
Duration
Format
Tutorial
educational
Views
8.2K
461 likes
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.

Members feature

Chat with this breakdown.

Modern Creator members can chat with any breakdown — ask for the hook, quote a framework, find the exact transcript moment. Unlocks at T2: refer 3 friends + add your own API key.

Create a free account →
Chapters

Where the time goes.

00:0001:04

01 · Cold open and what tmux is

Tmux as the substrate for agentic engineering — a terminal multiplexer that keeps sessions alive when you disconnect.

01:0402: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:2403: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:5005: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:2007: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:0310: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:0512: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:4014: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:3518: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:0022: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:0026: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:0529: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:5633: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:4422: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:2024: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:1025: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 Mentioned

Things they pointed at.

07:08productHostinger VPS
09:00productHostinger coupon code DAVID (extra 10% off)
14:40tooltmux
17:43toolCodex CLI (OpenAI)
22:02toolClaude Code CLI (Anthropic)
24:48toolTerminus (iOS SSH client)
24:10toolHermes agent
24:10toolOpenCode
24:10toolPyre (Mario Zechner)
19:30toolSvelte + Vite (used in the live build)
25:20linkFree terminal-commands bundle (davidondrej.com/tmux-installation-guide)
Quotables

Lines you could clip.

00:00
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.

metaphoranalogy
00:00TMux 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.
00:11But 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.
00:26Without 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.
00:36While 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.
00:55All 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.
01:09Let me not get ahead of myself because I don't wanna overwhelm you. So first, open up a terminal. Any terminal is fine.
01:15If 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.
01:23Boom. Just like that. And by the way, if you get stuck at any point in this video, just ask Chargibt or Clot.
01:28For example, let's say you're not on macOS and you're getting confused. Well, I'll show you how to solve that. Right?
01:32Boom. 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.
01:40How do I actually install this? Be very concise. So don't make excuses.
01:44As 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.
01:52We have the t max version. Beautiful. Let's do clear.
01:54And 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.
02:09And boom. Here we are. You can see this green bar at the bottom.
02:12When 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.
02:20And 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.
02:29For 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.
02:37So 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.
02:48It 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.
02:54Little 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.
03:03You 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.
03:15So 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.
03:31And 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.
03:41Windows 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.
03:55Otherwise, 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.
04:07Okay. 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.
04:21You 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.
04:37So 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.
04:45So 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.
04:54So 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.
05:07Hostinger 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.
05:17This 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.
05:34Here 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.
05:43It 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.
05:53That'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.
06:01It'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.
06:07You can easily change it, generate a secure one. Boom. Of course, do not share this with anybody.
06:12Otherwise, 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.
06:20So 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.
06:27Right? 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.
06:35All 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.
06:46You 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.
06:54So 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.
07:03Now 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.
07:17So 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.
07:28It 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.
07:33Type 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.
07:45Clear. Do t mux dash v, and as you can see, we have version 3.4.
07:49Now the next command you absolutely must run, nonnegotiable, and that is to enable mouse support. So run this command echo set g mouse on.
07:56I 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.
08:09So, again, it's the second link below the video. Go grab it now. Okay.
08:11So 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.
08:19We 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.
08:36Right? 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.
08:42Okay? So it's not control b percentage. It's control b, let go, and then press percentage.
08:46Another thing you need to know is control b quotation. This will split it vertically. Right?
08:51So same thing. Control b to activate the shortcut and then quotation to split it.
08:56So 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.
09:06You know? Pinggoogle.com. Boom.
09:09And 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.
09:18Look how many terminals we have running. Right? Isn't this beautiful?
09:21This is the magic of TMax. Also, can do exit to exit any of them. Right?
09:26So we can keep splitting indefinitely, basically.
09:29Boom. Control b percentage. And, yeah, each of these could be separate AI agent.
09:34Now 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.
09:48So to install Codec CLI, just type in Codec CLI and click on the open AI developers link. It's literally a single command.
09:55So just copy that. Boom. Back to terminal.
09:58We 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.
10:07It's very annoying. With mouse support, it's much easier. Also, another thing, we can do control b detach.
10:12Right? So control b and d. And then if you wanna kill everything, that's t max kill server.
10:18So, 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.
10:28Beautiful. Just like that. But if you wanna kill everything, just it's kill server.
10:31Tmax kill server. Boom. And now we do Tmax LS to list out everything.
10:36Nothing is running. Beautiful. So now just paste in the command from OpenAI docs to install Codec CLI.
10:41Let'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.
10:48You 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.
10:58It 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.
11:05Right? You type in codex, then you have three options, ChaiGPT device code and API key. Easiest is device code.
11:10I'm gonna click that, and then we need to copy this. Right? Copy this link that the terminal gives you.
11:16Go 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.
11:23Okay. Let's put that in. Boom.
11:25Now 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.
11:32Just make sure you have any paid plan. And then back to the terminal, we have this nine digit code. Copy that.
11:39Paste it in. And we should be good. If we check here, we should be logged in.
11:42There we are. Okay. So hit enter.
11:44The 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.
11:55Okay? 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.
12:03As 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.
12:12Then I'm gonna do control b percentage to split the t max. There we go.
12:17And we can launch another one, codex dash dash yellow. And now you can feel the power. Right?
12:22You 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.
12:33Boom. Boom. And this is how you run multiple agents on a VPS persistently.
12:39So 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.
12:49Whatever you wanna do. Right? And this goal, it will run for hours.
12:53Maybe 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.
13:06But 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.
13:17It would be distracting you. You have to keep it open. You cannot accidentally close the tab.
13:21With 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.
13:28And 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.
13:35I can c d. I can make a directory. You know?
13:38Mm-mm. YouTube. I can c d into YouTube.
13:41You know? And you can do whatever you want on the same BPS, and then always to t max l s. You can see, okay.
13:47It's named test. If you forget their name, that's helpful. You know?
13:50You 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.
13:59Now 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.
14:08Clothecode CLI install. There it is. Click the first link.
14:11They also have a one liner installer, so just copy that. Back into terminal. Again, the detach, control b d.
14:17You need to learn this. Okay? You need to learn that command, control b d.
14:20It's essential. Paste that in. It's gonna install a Cloth Code CLI.
14:23And, 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.
14:36Create 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.
14:52Build the full thing end to end.
14:56So 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.
15:06So 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.
15:16So with the subscription, console account, third and party platform. I'm just gonna go subscription. It's probably the easiest.
15:21Obviously, you don't have cloud subscription, use the API or something. Boom. Paste that into our browser here.
15:27Authorize. Need to copy this code. Paste that here, and we should be good.
15:31Enter. Enter. Enter.
15:34And we're here. Let's do slash model to select model we want. Okay.
15:37Opus is by default. Let's send a message. Hey.
15:41There 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.
15:49So 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.
15:55Also, 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.
16:04I'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.
16:11You 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.
16:28But 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.
16:38Just normal cloth. And we can say, run l s and tell me all the dears we have.
16:46And 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.
16:56It 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?
17:06So 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.
17:13So 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.
17:27And 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.
17:40Right? And, again, this is running on our VPS and it's building the app. You can see that we have the web app.
17:45So I'm gonna say, go into the web app and explain what the state is. Be concise. Yeah.
17:52So 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.
17:59You can click here. Maybe this guy is, you know, lazy, so you can do a definite another section here. Cloth.
18:06Okay. 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.
18:14And 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.
18:27And 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.
18:34Maybe this can be a three d game. Okay. And now here we're gonna do another codex yolo.
18:39Let'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.
18:51And 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.
18:57We have test. So I'm gonna do attach to the test one, see how this development is going.
19:02Okay. This guy is still running. Four minutes thirty.
19:04Uh, this guy already explained it. Let's see what's happening. It's real working.
19:08Okay. We need to run it, improve the docs, command b d, detach from it.
19:15We can do clear, t mux attach dash t, three d game. Let's see how this is going.
19:20It's still brainstorming, thinking some more. That's a new feature in Cloud Code.
19:24Alright. 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.
19:30We have development running on a VPS. My MacBook is running smoothly. You know?
19:33I 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.
19:40But, 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.
19:46My battery wouldn't run out. Everything's running on a VPS. If my Internet gets disconnected, my agents keep running.
19:52If 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.
20:03T 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.
20:12Now 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.
20:18I disconnected. So I'm on my MacBook, okay, on my desktop. I'm gonna launch a new terminal.
20:22I'm not even SSHed. So back to Hostinger panel. I'm gonna copy this again.
20:26Boom. Run it. I forgot the password to be fair, so I'm gonna reset it.
20:30Boom. Reset. Put that in.
20:34Let's do clear. This is completely fresh SSH. I killed everything, killed the connection, but we can do t max l s.
20:41Oh, and we have sessions running. This is the beauty of t max, persistence and the multi agent, right, in the in the user interface.
20:48Really, 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.
20:58PMReal. Okay. Flights.
20:59Okay. So I can ask, how can I see this app? I'm SSHed into this VPS via my MacBook.
21:07I'm gonna give it the command. Here is the IP. Boom.
21:12Give me step by step. Be very concise. On the VPS, run this.
21:17Okay. So, actually, we can we can easily do it here. Let me let me click here.
21:22We can reuse some of these terminals. What is it? Yes.
21:25Allow. This cloud core is useless. I'm gonna control c to kill it, but I'm gonna run it here.
21:30CD root web app. Let's copy that. CD slash root web app.
21:37What do we need do? NPM run dev dash dash dash dash host zero zero zero zero.
21:43There 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.
21:52And just copy this command. Okay.
21:56It'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.
22:03So 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?
22:12HTTP colon dash dash, and this should work. SSH tunnel.
22:18So it needs the IP. So let's go back to hosting the panel, give it IP. Here is the IP.
22:24Give me the updated command. There we go.
22:29Let's run it here. Needs the password. Let's give it that.
22:32So and then we can go new browser tab. And here is our flight monitor built fully on a VPS. Look at it.
22:39And we can keep developing it. Right? So let's go back into TMax.
22:42And 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.
22:49We 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.
23:19Boom. It's gonna be pursuing this goal for many hours, developing our app and I can do whatever I want.
23:26I 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.
23:45This 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.
23:53We were able to install TMax and Cloth Cloth Code very quickly.
23:58We 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.
24:06If you don't have the subscriptions, why? It's $20.26.
24:10You 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.
24:19Because watching is useless before action. So this will already put you ahead of 99.9% of people.
24:25Most vibe coders have nothing even close to this. They're completely scared of Tmax. They don't know what it does.
24:30They don't know how to set it up. They don't have a VPS. They're developing everything locally, just confused.
24:35If 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.
24:43Right? Whether it's inside of Hermes. When and even Clothcore has its slash goal.
24:46Right? 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.
24:53The 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.
25:02No matter if you're running your automations, your agents, your deploy you can deploy your full stack web app on hosting VPS.
25:09You 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.
25:14It'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.
25:29Oh, 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.
25:38It'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

  1. Session — the named workspace that wraps everything; you attach to it by name
  2. Window — like a tab in a browser; one session can hold many windows
  3. 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

  1. tmux new -s <name> — create a new named session
  2. Ctrl-B then D — detach without killing anything
  3. tmux attach -t <name> — reattach to a session by name
  4. tmux ls — list every active session
  5. Ctrl-B then % — split pane horizontally (left/right)
  6. Ctrl-B then " — split pane vertically (top/bottom)
  7. 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
07:03list

The agentic engineer's host stack

  1. VPS — $6/month Hostinger KVM-2, Ubuntu 24.04, always-on
  2. SSH — the access protocol from your local machine
  3. Tmux — persistent multiplexer wrapping every agent run
  4. Codex CLI / Claude Code / Hermes — the agents themselves, one per pane
  5. 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.

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.

Storyboard

Visual structure at a glance.

cold open: tmux logo
hookcold open: tmux logo00:00
what is tmux
promisewhat is tmux00:22
agentic engineers on VPS
promiseagentic engineers on VPS00:41
detach shortcut
valuedetach shortcut03:40
three building blocks
valuethree building blocks03:51
Hostinger checkout
valueHostinger checkout05:17
VPS overview panel
valueVPS overview panel07:03
split pane shortcut
valuesplit pane shortcut08:49
Codex auth screen
valueCodex auth screen11:03
two Codex panes
valuetwo Codex panes12:39
Codex /yolo running
valueCodex /yolo running15:52
Claude Code joins
valueClaude Code joins17:28
kill SSH, reconnect
valuekill SSH, reconnect20:24
Svelte flight monitor
payoffSvelte flight monitor22:47
free bundle CTA
ctafree bundle CTA25:29
Frame Gallery

Visual moments.