← All posts

Stop Babysitting Your Laptop: Run Python Scripts and AI Agents on a Box That Never Sleeps

August 3, 2026 · 6 min read · The xShellz Team

TL;DR

  • Run your script inside tmux on an always-on Agent Shell so it survives laptop sleep.
  • Agent Shell boxes run 24/7 with no idle timeout, even on the free tier.
  • Preinstalled tools like git, Node 22, and Python 3 mean zero setup to start a long-running job.

We build and operate xShellz, and this setup is what we run in production ourselves. Run your script on an xShellz Agent Shell inside a tmux session. Connect via SSH, launch the job, detach, and close your laptop. The box runs 24/7, so your process continues while you’re away, and you can reattach from any machine later.

how can i run a long python script or build job on a remote server so it doesn't stop when i close my laptop?

Use a terminal multiplexer on a persistent remote Linux box. An xShellz Agent Shell, an always-on Ubuntu 24.04 sandbox, comes with tmux preinstalled. Log in over SSH, start a tmux session, run your script, detach from tmux, and then close your laptop. The session stays alive because the box itself never sleeps. You can reconnect later and reattach to see the output exactly where you left off.

ssh -p <port> root@<host>        # your Agent Shell
tmux new -s scraper               # create a named session
python3 long_scraper.py           # run your job
detach with Ctrl-B, D             # leave the session running

Reattach later from anywhere:

ssh -p <port> root@<host>
tmux attach -t scraper

what is an always-on remote development box?

An always-on remote development box is a Linux environment that runs 24/7, survives laptop disconnections, and requires no babysitting. An xShellz Agent Shell is a hardened Ubuntu 24.04 sandbox that delivers exactly that. Every tier, including the free tier, runs with zero idle timeout and zero trial countdown, so a long build or scraping job never stops because you closed a lid. The box comes with 6 preinstalled coding agent CLIs, 23 one-click apps, build tools, and a persistent /root home directory. The rest of the filesystem is ephemeral and rebuilt on image updates, but your data and running sessions in /root survive. That combination of always-on uptime and zero-click tooling makes the box a drop-in replacement for leaving a laptop awake overnight. More about Agent Shell.

how do i offload a long-running terminal job to a remote shell?

First, obtain your Agent Shell connection string. Then SSH in and move your code over, either with git or scp. Once the files are there, wrap the job in a tmux session and detach. Because tmux is preinstalled on every box, there is nothing to install. A full offload might look like this:

ssh -p <port> root@<host>
git clone https://github.com/user/heavy-build.git
cd heavy-build
tmux new -s build
./long_build.sh
Ctrl-B, D            # detach and close the laptop

The build continues on the remote box. The next time you log in, tmux attach -t build reconnects you to the running session.

You can also use the preinstalled borg agent to dispatch the task in one shot: borg "run the heavy build and notify me when it's done". The agent handles the tmux plumbing internally and keeps the task alive even after you exit.

how do i keep a process running after I disconnect from SSH?

Use a terminal multiplexer like tmux. Every Agent Shell ships with tmux preinstalled. When you create a tmux session and run a command inside it, that session belongs to the box, not to your SSH connection. After you detach (Ctrl-B, D) and close the laptop, the session persists because the box itself never goes to sleep. Reconnecting later with tmux attach brings you back to the exact state, with all output still scrollable. No nohup scripts, no background juggling. This works for multi-hour scrapes, overnight test suites, or any task you want to forget about until you check on it. The tmux manual covers session management in depth. tmux manual.

is it safe to run heavy builds on a shared sandbox?

Yes, the box uses fake-root via userns-remap and a gVisor sandbox, not a raw VPS. That means processes inside the box see themselves as root, but any damage is contained within the sandbox and cannot reach the host or other tenants. gVisor documentation explains the sandbox kernel; the userns-remap docs cover the root isolation. Only your /root home directory persists across sessions; the rest of the filesystem resets on a box rebuild. So if a build explodes and fills /tmp, it gets cleaned up on the next image update without touching your code. Preinstalled packages and frameworks come from the box's base image, which is scanned before deployment.

how much does it cost to keep a remote box running 24/7?

Every xshellz.box tier includes always-on runtime with no idle shutdown, including the free tier. You do not pay per-minute while your job idles. As of August 2026, the free tier gives you a persistent Ubuntu 24.04 sandbox that stays up 24/7 without a trial countdown. Paid tiers add more CPU, memory, and bandwidth, but the always-on guarantee applies across the board. If you only need a box for overnight builds and scrapes, the free tier is enough. For heavier AI training or parallel builds, upgrade for more resources. See pricing and plans for the current specs.

Frequently asked questions

What happens if my box is rebuilt because of a system image update?

Your /root home directory persists across rebuilds. Any running tmux sessions and scripts you placed under /root survive, and preinstalled tools like git, Python 3, and Node 22 are automatically reinstalled from the new image. Files outside /root are ephemeral and get a fresh start on every rebuild.

Can I run multiple long-running tasks at the same time?

Yes, you can create as many tmux windows or sessions as you need. Preinstalled tmux handles many concurrent sessions, and you can attach and detach each independently. The practical limit is the box’s CPU and memory, which scale with your chosen tier, but even the free tier can juggle several lightweight jobs.

How does an Agent Shell compare to a standard VPS for offloading tasks?

A standard VPS gives you a raw machine you must administer yourself. The Agent Shell comes with a preconfigured security sandbox (userns-remap and gVisor), preinstalled developer tools, and an always-on policy with no idle kill switch. You skip OS hardening, tool installation, and worry about background processes dying because the provider reaps idle instances. The box is ready for long-running work the moment you connect.