← All posts

I Ship Code While I Sleep. Here's How.

July 20, 2026 · 5 min read · The xShellz Team

I used to measure productivity by hours spent typing. Now I measure it by the quiet hum of a remote Linux box running a refactor while I'm asleep. The shift from active coding to agentic orchestration isn't about replacing yourself with AI. It's about giving the AI a place to keep working when you're not around.

The broken laptop loop

A typical workflow: open laptop, start a long running test suite, wait. Close the lid to go to a meeting and the test dies because the machine slept. Or your Wi-Fi drops mid-refactor. The laptop is a fragile host for tasks that take 20 minutes, let alone 8 hours. Even with a perfect connection, the mental loop of "I need to keep this running" tethers you to the machine.

A persistent remote shell changes that. SSH into a Linux box, fire up tmux, and your session lives independently of your local hardware. You can detach, shut down, and the work continues. The shell is always on, whether you're sleeping, commuting, or deep in another project.

From writing code to orchestrating tasks

AI coding agents have made this shift practical. Tools like borg (the terminal agent we run on xShellz) can accept a high-level prompt and iterate on a codebase for hours. But they need a stable environment, not a laptop that might hibernate. The pattern becomes: you describe the work, the agent runs it on a remote box, and you review the output the next morning.

For example, last week I needed to convert a 12,000-line TypeScript monorepo from CommonJS to ESM. I could have done it manually over a few days. Instead, I wrote a short script that called borg with a detailed prompt: "Add 'type: module' to each package.json, update all imports to include .js extensions, fix any broken relative paths, and run the full test suite after every change. Log every action." I started it in a tmux session on my xShellz shell, detached, and went to bed. By morning, I had a branch with 42 changed files, a passing test suite, and a tidy log of what was done. My involvement: 5 minutes of reviewing the diff and hitting merge.

The always-on developer stack

You don't need exotic infrastructure. The core pieces are simple:

  • A remote Linux machine you can SSH into (a $5 VPS or a hosted shell works).
  • A terminal multiplexer (tmux or screen) so your session survives disconnects.
  • A script or agent that can run unattended. That could be a shell script that runs a linter, a test suite, or an AI agent like borg in a loop.
  • A way to trigger tasks. I often use a cron job that checks a git repo for new instructions every 30 minutes, but you can also just start a long-running command manually before you step away.

Here's a concrete tmux session I might start on a Friday evening:

ssh -t mybox 'tmux new-session -s nightly-fix'
# Inside tmux:
bd fix 'Find all React components that use deprecated lifecycle methods and migrate them to the hooks API. Run unit tests after each file change. Abort if any test fails.'

Then I detach (Ctrl-b d) and log out. The agent works through the list, commits each change with a descriptive message, and I pick up the branch on Monday with a clean history.

What you actually gain

This isn't about output volume. It's about decoupling your attention from execution. You can plan a sequence of refactors in 10 minutes and let them run while you're in deep-focus mode on something else, or literally asleep. The machine keeps going.

For me, the practical gains are:

  • Long-running tasks (test suites, type checks, fuzzing) become background noise. I don't stare at a progress bar.
  • Codebase-wide refactors that would drain a day of focus happen overnight.
  • I can review the agent's decisions with fresh eyes in the morning, catching mistakes I'd miss if I were the one editing each file.

Pitfalls and how to handle them

Agents make mistakes. They can misinterpret a prompt, rewrite working code, or introduce subtle bugs. The always-on workflow doesn't remove the need for review, it just shifts when you review. I treat the morning after as a code review session, not a merge party. I read the diff, run the tests again, and if the agent left comments in the log, I check those too.

Cost is another factor. A remote shell with enough CPU to run AI agents isn't free, but even a modest VPS can handle borg's model calls. If you're using a service like xShellz, the shell comes with borg pre-configured, so you skip the setup overhead. But the pattern works on any Linux box you control.

The real unlock

The "always-on" developer isn't a person who works 24/7. It's a developer who has offloaded the grinding parts of the job to a machine that can work while they rest. You stop measuring your value by keystrokes and start measuring it by the cadence of branches that appear while you're away.

If you're already using an AI coding agent, ask yourself: is it still bound to your laptop's sleep schedule? Put it on a box that never sleeps. The shift is cheap, and the first morning you wake up to a completed refactor you didn't micro-manage, you'll wonder why you waited.