Docs for SCORPIOX CODE @ 13253cf

Native Linux Container Runtime for AI Agents

One binary in pure C that turns any Linux kernel into a rootless, daemon-free container runtime: user namespaces, ephemeral root filesystems, isolated networking, and a sub-second start for every agent session.

You want an AI coding agent running somewhere it cannot touch your real machine — but you do not want to pay for it with a hypervisor, a Docker Desktop license, or a daemon that has to be up and healthy before anything can start.

scorpiox-unshare is SCORPIOX CODE's native Linux container runtime. It is a single small binary written in pure C with zero external dependencies, and it builds isolation out of the kernel itself — Linux user namespaces — rather than out of a virtual machine, a background daemon, or a second operating system. Hand it an image and a command and it hands back a fast, rootless, isolated Linux environment that is ready in a fraction of a second and cleaned up the moment the command exits.

There is no daemon to install, no dockerd to keep running, no VM image to boot, and no network stack to configure. One binary, one command, one container.

Docs for SCORPIOX CODE @ 13253cf.

The whole idea in one line: scorpiox-unshare <image> <command> runs any agent or command inside a real Linux user namespace — no Docker, no podman, no daemon, no VM — and it is the default environment under every SCORPIOX CODE agent session.


The two ways to run it

scorpiox-unshare has one command shape and two ways to put it to work.

This is the one you will actually use. The SCORPIOX CODE session manager, scorpiox-tmux, builds every agent session on top of scorpiox-unshare by default. You never type the runtime's name: you start a session, and the runtime is already underneath it.

# Inside the scorpiox-tmux dashboard, at the > prompt:
/new myapp

That one command picks the default image, downloads and unpacks it once, mounts your project in, and runs the agent inside the namespace. The runtime is invisible plumbing — which is exactly the point. You can still name the mode or the image explicitly when you want to:

/new myapp unshare               # force unshare mode
/new myapp agentcore-latest      # unshare, with this image
/new myapp desktopx11-latest     # unshare, with a desktop

Everything about how that path behaves — which image, which mounts, which extra flags — is driven by a small set of TMUX_ keys in scorpiox-env.txt, covered in Configuration.

2. Direct: run any agent or command

scorpiox-unshare is not locked to SCORPIOX CODE. It is harness-agnostic: <image> <command> runs any command — any agent, any script, any shell — inside the container. That makes it a general-purpose rootless runtime you can reach for from anywhere.

scorpiox-unshare agentcore-latest                  # interactive shell
scorpiox-unshare agentcore-latest "uname -a"       # one-off command
scorpiox-unshare --bind ~/proj agentcore-latest    # your project at /workspace

The first form drops you into an interactive shell; the second runs the command and exits with its status. The image is resolved, cached, and mounted identically either way.

A third consumer ships in the box: the SCORPIOX CODE agent runner (scorpiox-sdk --agent) launches each agent through the same runtime, binding its task directory at /workspace and a build cache at /persist. You get the same isolation whether an agent is started by hand, by the session manager, or by automation.


What the isolation actually is

Every container is a real kernel construct, not a chroot and not an emulation layer.

Two consequences worth internalizing:


Images

A container is built from an image: a .tar of a root filesystem, or an OCI image layout. scorpiox-unshare resolves the <image> argument in this order and passes any name through verbatim:

  1. A local path — anything starting with / or . is treated as a path to a .tar on disk.
  2. A cached image — if <image>.tar is already in the image cache, it is used as-is.
  3. A download — otherwise it is fetched from the image base URL and cached for next time.

Two images cover almost everything you will do with SCORPIOX CODE:

ImageWhat it is
agentcore-latestThe headless default. No desktop. This is what /new myapp uses out of the box.
desktopx11-latestAdds a full desktop — Xvfb, XFCE, VNC, Chrome — for agents that need a GUI.

A few things worth knowing about image handling:

scorpiox-unshare --list                # see what is available, with sizes and what is cached
scorpiox-unshare --update agentcore-latest   # re-download and re-extract one image
scorpiox-unshare --clean               # remove all unpacked root filesystems and work dirs

Flags

FlagWhat it does
--bind <dir>Bind-mount a host directory at /workspace (and start the shell there).
--persist <dir>Bind-mount a host directory at /persist, for anything that must outlive the container.
-v H:C[:ro]Mount host path H at container path C, optionally read-only. Repeatable.
-p H:CPublish container port C on host port H. -p H+ picks the first free host port at or above H. Repeatable.
-e KEY=VALUESet an environment variable inside the container. Repeatable. -e KEY with no = copies the value from your host environment.
--memory <limit>Set a memory ceiling (e.g. 40G, 512M) via a cgroup v2 limit.
--gpuPass host NVIDIA GPU (and DRI) devices through into the container.
--net hostUse host networking instead of the isolated default.
--gui-foregroundOn desktop images, run your command in the foreground so it owns the terminal; the desktop starts detached.
--no-overlayForce bind-mount mode instead of overlayfs.
--privilegedRun with real root and no user namespace. Requires running as root; the runtime prints a loud warning.
--home <path>Override the runtime home directory (normally from SCORPIOX_HOME, default ~/.scorpiox).
--no-perfDisable the boot-timing output (or set SCORPIOX_PERF=0).
--verboseShow debug output.
--list / -lList available images.
--update <image>Re-download and re-extract an image.
--cleanRemove unpacked root filesystems and leftover work directories.
-v / --versionPrint the version.
-h / --helpShow help.

Four of these deserve a sentence each:

Limits to be aware of: up to 16 port mappings, 16 volume mounts, and 32 environment variables per container. That is plenty for an agent workspace and keeps the runtime small.


Networking and ports

The default is isolated networking: the container gets its own network stack with its own interfaces, and reaches the outside world through a small userspace network process (slirp4netns). The container sees a normal-looking interface and a resolver pointed at the network gateway; host loopback is not reachable from inside, which is the isolation you want.

To reach a service inside the container from outside it, publish a port:

scorpiox-unshare -p 8080:8080 agentcore-latest "python -m http.server 8080"

-p H:C maps host port H to container port C; -p H alone maps the same port on both sides. The -p H+ form is the useful one for automation: it asks for the first free host port at or above H, so parallel containers never fight over a port — the desktop images use exactly this to publish VNC.

By default a published port binds on all interfaces. Set SX_PORT_BIND_ADDR=127.0.0.1 to keep it on loopback only — strongly recommended for anything unauthenticated, and reachable from elsewhere with a plain SSH tunnel.

--net host skips all of the above and shares the host's network namespace: the container sees your interfaces, your resolver, and everything listening on your machine. It also removes the need for the network helper entirely, which is why some minimal hosts use it — but it is a real reduction in isolation.


Inside the container

A few things are set up for you before your command runs:

Everything is torn down again on exit: the writable layer, the temporary mounts, and the per-run work directory are removed, and the container's exit status is passed straight back to your shell. Interruptions (Ctrl-C, SIGTERM) clean up too.


Configuration (the TMUX_ keys)

When you run through the SCORPIOX CODE path you do not pass these flags by hand — you set keys in the same scorpiox-env.txt cascade the rest of the product uses (see Configuration and Profiles for tiers, precedence, and profiles). The keys that matter for unshare sessions all start with TMUX_:

KeyMeaning
TMUX_LAUNCH_MODEunshare (default), podman, wsl, or native. Sets how sessions are built.
TMUX_DEFAULT_DISTROThe default image for unshare sessions. Shipped as agentcore-latest.
TMUX_UNSHARE_EXTRA_ARGSExtra CLI arguments passed verbatim to scorpiox-unshare (e.g. --persist /data -p 8080:8080).
TMUX_UNSHARE_NET_MODENetwork mode: empty = isolated (default), host = shared host networking.
TMUX_UNSHARE_VOLUME_MOUNTExplicit volume mount. Leave empty to auto-mount the project base paths.
TMUX_BIND_HOST_BINSBind-mount the host's SCORPIOX CODE binaries into the container instead of re-downloading (default on).
TMUX_BIND_USER_CONFIGBind-mount ~/.claude into the container read-only (default on).
TMUX_BIND_TOOLSBind-mount a host tools directory at /mnt/apps read-only (default off).
TMUX_TOOLS_PATHThe host directory used when TMUX_BIND_TOOLS=1 (default /root/tools).
TMUX_GUI_FOREGROUNDOn desktop images, run the agent in the foreground so it owns the pane (default on).
TMUX_GUI_VNC_PORTPublish the desktop's VNC port to a free host port so you can watch it (default 0 = off).
TMUX_GUI_VNC_BINDHost address the published VNC port binds to (default all interfaces; set 127.0.0.1 on a shared network).
CONTAINER_PACKAGESPackages to auto-install on container start (default none).
IMAGE_BASE_URLWhere images are downloaded from (default https://dist.scorpiox.net/container-images/).
SCORPIOX_HOMEThe runtime's home directory (default ~/.scorpiox).

Volume mounts deserve one note: with TMUX_UNSHARE_VOLUME_MOUNT empty, the session manager mounts your project base paths into the container at the same paths they have on the host, so agent and host see the project in the same place. Set the key to a host:container pair to control it yourself.

A minimal scorpiox-env.txt that says "unshare, headless, on this machine":

TMUX_MODE=local
TMUX_LAUNCH_MODE=unshare
TMUX_DEFAULT_DISTRO=agentcore-latest

Everything else falls back to the shipped defaults, and every one of these keys also works as an OS environment variable or inside a named profile, exactly like the rest of the configuration cascade.


How it compares to Docker and podman

If you already know docker or podman, here is where scorpiox-unshare stands relative to them — and where it does not.

scorpiox-unshareDocker / Docker Desktoppodman
DaemonNone — one process per containerA daemon is required and must be runningRootless mode has no daemon, but the tooling around it is heavier
Requires rootNo — rootless by designDocker Desktop: no, but it runs a Linux VM underneath; plain dockerd: yesNo, in rootless mode
Virtual machineNo — kernel namespaces onlyDocker Desktop on macOS and Windows: yesNo — kernel namespaces
External dependenciesNone in C; slirp4netns only for isolated networkingA large daemon, a container runtime, and a registry clientpodman plus buildah, skopeo, and a container runtime
Image format.tar root filesystem / OCI layoutOCI / registry imagesOCI / registry images
StartupA fraction of a second from the cached root filesystemFast, but daemon and image pull add upComparable to unshare in rootless mode
FootprintOne small binaryLarge — daemon, VM on non-Linux, registry clientModerate
Build / multi-stage / compose / network objectsNone of theseYes, extensivelyYes, extensively
Best atDisposable isolated Linux for an agent or a commandGeneral container platformGeneral container platform, daemonless

Where it is superior. For the specific job of "give an AI agent a fast, isolated, disposable Linux environment," scorpiox-unshare does more with less. There is no daemon to install, babysit, or restart after a reboot; no VM image to boot, patch, or license; no registry client to configure; nothing resident between uses. The thing you are actually optimizing for — a real isolation boundary with near-zero setup and near-instant start — is exactly what a namespace runtime is good at and exactly where a full container stack is overkill. Starting a container becomes the boring, reliable, sub-second part of the experience rather than a thing you troubleshoot.

The honest limits. It is not a general container platform, and it does not pretend to be. There is no Dockerfile builder and no multi-stage builds; images are pulled as root filesystems from a base URL rather than built and published through the registry ecosystem; there is no compose, no named networks, no volume objects — you get port publishing and bind mounts, and that is the whole surface. A --memory limit needs cgroup v2 with a writable cgroup tree on the host. GPU passthrough only exposes devices that exist on the host. If your real job is "run a containerized service with a build pipeline and a compose stack," use Docker or podman — that is what they are for. scorpiox-unshare is for the one thing it does exceptionally well: a fast, isolated, rootless Linux box for a command, with nothing else attached.

The one soft dependency worth naming: isolated networking uses slirp4netns, a small userspace network tool. It is the only external piece the runtime ever reaches for, and only when you use the default isolated network. --net host skips it entirely; if it is missing, the runtime tells you plainly and fails fast rather than starting a container with a broken network.


A typical session, end to end

Through SCORPIOX CODE:

scorpiox-tmux                       # open the session dashboard
/new myapp                          # build the unshare session (downloads the image on first run)
/watch myapp                        # watch it work (Esc to stop)
/send myapp "git status"            # poke it without taking over the pane
/enter myapp                        # jump in when it needs you
/kill myapp                         # tear it down when it is done

Directly, without SCORPIOX CODE:

scorpiox-unshare --bind ~/myapp agentcore-latest "make test"
# or drop into a shell:
scorpiox-unshare --bind ~/myapp agentcore-latest

Either way the container is built from the image, your project is mounted in, the command runs, and the ephemeral state is cleaned up on exit. What survives is what you explicitly mounted with --bind, -v, or --persist.


Gotchas


The bottom line

scorpiox-unshare is the reason SCORPIOX CODE can hand every agent an isolated Linux environment without asking you to install or run anything first. It is a pure-C, rootless container runtime that leans on the kernel's namespaces for isolation, pulls a root filesystem image when it needs one, and starts a container in a fraction of a second with no daemon, no VM, and no external machinery. It is the default under your SCORPIOX CODE sessions, and it is also a standalone tool: point <image> <command> at anything and you get a disposable, isolated Linux box to run it in.