← All posts

Your Laptop Closes, Your Job Dies. Here’s How to Keep It Running on a Remote Box That Never Sleeps.

September 4, 2026 · 4 min read · The xShellz Team

TL;DR

  • An xshellz Agent Shell box runs 24/7 with no idle timeout, so your long-running scripts survive laptop disconnects.
  • Use tmux, preinstalled on every box, so you can detach from a session and reattach later without losing your place.
  • Your home directory at /root persists across box rebuilds, while the rest of the filesystem resets for a clean environment.

Run your long script on an xshellz.box Agent Shell inside a tmux session, and it will keep going even when you close your laptop. The box stays powered on 24/7 with no idle timeout, so your SSH disconnect does not kill the process. We build and operate xshellz: the borg terminal agent, the Agent Shell boxes and the hosted model gateway behind them. Everything below is what we run in production ourselves, not a demo.

How can I run a long script or build process on a remote server so it doesn't die when I close my laptop?

SSH into your xshellz Agent Shell box, start a tmux session, launch your script, then detach. The process runs inside the tmux server on the box, independent of your SSH connection. Close the laptop or lose Wi-Fi, and the job continues. When you reconnect later, run tmux attach -t scrape to pick up right where you left off.

# From your local machine
ssh -p <port> root@<host>

# Once inside the box
tmux new -s scrape
python3 long_scrape.py
# Press Ctrl+b, then d to detach

how to run long tasks on a remote linux box without it stopping

The key is to decouple the running process from your terminal session. Tmux does that by creating a persistent server on the remote host. On an xshellz.box, which is always on and never hibernates, a tmux session survives anything short of a deliberate reboot. Even the free tier has zero idle timeout; your scraper or compile job will still be humming hours later when you check back.

running heavy builds or scrapers on a cloud shell

Most cloud shells kill your session after a few minutes of inactivity. An Agent Shell box does not. It is a full Ubuntu 24.04 LTS environment with Node 22, Python 3, git, build-essential, and ripgrep preinstalled. That means you can start a large make -j$(nproc) or a multi-hundred-page scrape without first installing any toolchain. The box runs on hardware with a gVisor sandbox and userns-remap for safe root access, so you can install packages, open ports, and spawn processes freely without affecting other tenants.

how to use tmux to keep a remote process alive on xshellz

Tmux is preinstalled on every Agent Shell box. The workflow follows a simple pattern: create a named session, run your long command inside it, and detach. To reattach later, list sessions with tmux ls and pick the one you want. If you need multiple parallel jobs, create multiple sessions (e.g., tmux new -s build and tmux new -s scrape). All of them persist because the box itself never stops. The official tmux manual has more tips on splitting panes and scripting sessions.

# Inside the box
tmux new -s heavy_build
make -j$(nproc) world
# Detach with Ctrl+b d

# Somewhere else, possibly days later
tmux attach -t heavy_build

offloading compute from my laptop to a remote linux server

An xshellz.box lets you move resource-intensive work off your laptop entirely. Your local machine stays free for editing code or browsing while the box crunches numbers. The box is a hardened Ubuntu 24.04 VM, not a raw VPS, so you get root safely via userns-remap and a gVisor sandbox. Your persistent /root directory keeps your code, dotfiles, and any service configuration (like znc or irssi) across image updates. Because every tier is always-on including free, you never have to worry about an agent or build being interrupted by a closed lid.

Frequently asked questions

Do I need to leave my laptop on for the remote process to finish?

No. The xshellz.box runs on our infrastructure 24/7, so even if you shut your laptop or lose network, the processes inside your tmux session keep running. The box does not sleep or time out on any plan tier, including the free one.

Will my installed packages and code survive a box rebuild?

Your home directory at /root is persistent and survives image updates. The rest of the filesystem resets to a clean state, but any tools you apt-install can be declared in an xshellz.box manifest file to be reinstalled automatically on boot.

Can I run AI coding agents like borg or Claude Code on the same box?

Yes. Every Agent Shell box comes preinstalled with six coding agent CLIs: borg, Claude Code, Codex, Gemini CLI, opencode, and pi. Just bring your own API key and run them inside a tmux session for long agentic tasks.