Tmux for AI Agent Development: Persistent Sessions and VPS Offloading
Generated: 2026-06-03 · API: Gemini 2.5 Flash · Modes: Summary
Tmux for AI Agent Development: Persistent Sessions and VPS Offloading
Clip title: Build Anything with Tmux, Here’s How Author / channel: David Ondrej URL: https://www.youtube.com/watch?v=z7xyZQVK4Dg
Summary
The video provides a comprehensive guide to tmux, a terminal multiplexer, emphasizing its critical role for “Agentic Engineers” in developing AI agents. The main topic revolves around how tmux enables persistent, multi-tasking terminal sessions, which is essential for running AI agents that often require hours or days to complete complex tasks without interruption. The video highlights that many leading AI developers already leverage tmux for this purpose.
The presenter first introduces tmux as a tool that allows users to run multiple terminals at once. Its most crucial feature for AI development is its ability to keep terminal sessions alive even when the user disconnects, whether due to a laptop dying, battery running out, or simply needing to close the lid. This persistence is vital for long-running AI agent tasks, such as large refactors or goal-oriented operations (e.g., /goal commands in Codex or Hermes). The video then demonstrates basic tmux installation on a local machine and fundamental commands like creating a new session (tmux new -s <session_name>), detaching (Ctrl+B D), and reattaching (tmux attach -t <session_name>). The core concepts of tmux – sessions, windows (like browser tabs), and panes (split screens within a window) – are clearly explained.
The true power of tmux for Agentic Engineers is unlocked when combined with a Virtual Private Server (VPS). By running tmux on a VPS, developers can offload heavy AI agent computations from their local machines to a remote server. This allows for continuous agent execution even if the local device is turned off, disconnected from the internet, or needs to run other tasks. The video includes a step-by-step walkthrough of setting up a VPS (using Hostinger as an example), connecting to it via SSH, installing tmux on the Ubuntu server, and configuring essential features like mouse support.
Finally, the video demonstrates how to install and run multiple AI agents, specifically Codex CLI and Claude Code, within different panes of a tmux session on the VPS. This showcases the ability to manage several long-running agents in parallel from a single terminal interface. The presenter reiterates the flexibility of detaching from the VPS session and reattaching later from any device (laptop, phone) to find the agents still actively working. The conclusion is that adopting tmux on a VPS is a non-negotiable step for modern AI development, allowing engineers to be significantly more efficient, persistent, and utilize their local resources optimally, essentially future-proofing their workflow.
Video Description & Links
Description
Setup your VPS today: https://hostinger.com/davidondrej
Get all of the assets from this video: https://www.davidondrej.com/tmux-installation-guide
Wanna learn how to code with AI? Go here: https://www.skool.com/new-society
We’re hiring: https://www.scalesoftware.ai/
Follow me on Instagram - https://www.instagram.com/davidondrej1/ Follow me on Twitter - https://x.com/DavidOndrej1
tmux: https://github.com/tmux/tmux/wiki
Subscribe if you’re serious about AI.
Build anything with Tmux, here’s how
Tags
David Ondrej, david ondrej, AI, ChatGPT, artificial intelligence, ai, Artificial Intelligence, OpenAI, chatgpt, chat gpt, Chat GPT, AGI, midjourney, david ondrej podcast, GPT, new society, david ondrej new society, david ondrej community, make money with AI, AI Agents, ai agent, AI Agent Startup, AI SaaS, AI Startup, tmux, TMUX, how to tmux, tmux ai agents