Run Takt safely
Takt runs other people’s code, and your agents’, on your own computers. This page says what that code can reach, and what Takt does about it.
What a job can touch
| Where | The job runs | It can touch |
|---|---|---|
| Linux, container job | in the project’s container, as a non-root user | its checkout, its project’s caches, the network, the secrets its project declares |
| Mac, macOS job | in a fresh Tart VM, deleted after | its checkout, shared into the VM, and the network |
| Mac or Windows, container job | in the Linux VM’s container (Tart on a Mac, WSL2 on Windows) | its checkout and caches inside the VM, and the network |
| Windows, job in a VM | in a fresh Windows 11 VM, deleted after | its checkout and the network |
| Windows, native job | as the account Takt runs as (takt on a system install), in a Job Object |
whatever that account can |
Linux or Mac, --here job |
as you, in your checkout | whatever your user can |
Linux jobs run in containers on the machine’s own Docker, so Takt’s account uses Docker the way any developer’s account does. For code you don’t trust, use machines you treat as disposable, or Takt’s VMs.
--here and native Windows jobs are not sandboxed: use them for jobs you’d run yourself.
The takt account
By default on Linux and Windows (and on a Mac with --whole-machine), Takt runs for the whole machine, as an unprivileged account of its own, takt: it runs the services and the jobs, and owns Takt’s state, caches and programs. Jobs don’t run as you, so a job can’t read your home. The person who installed Takt is in the group takt, which lets them reach the coordinator’s socket, deploy builds and restart Takt’s services; sudo takt system add-user <name> adds someone else.
A --here job does run as you, in your checkout: on Linux and macOS the installer adds a sudo rule for exactly that. On a Windows system install a --here job is refused, since a service account can’t act as you. --user installs Takt for you alone instead.
How jobs are bounded
On every OS, jobs run inside hard limits, so they can’t take the memory your session needs:
| Where | Memory | CPU |
|---|---|---|
| Linux, container job | Docker --memory, with swap capped at the same value |
--cpu-shares from its cores and priority, on as many CPUs as it reserved (--cpuset-cpus) |
Linux, --here job |
a systemd scope in takt-jobs.slice with MemoryMax, and MemorySwapMax=0 so it can’t swap beyond its cap |
CPUWeight from its cores and priority |
| Mac, macOS job | the VM’s size: the job’s memory and cores (at least 4 GB and 2) | the VM’s cores |
| Mac, container job | --memory, inside the Linux VM’s fixed size |
--cpu-shares |
| Windows, native job | the Job Object’s memory limit | the lowest weight in Interactive mode |
| Windows job in a VM | the VM’s size (at least 4 GB and 2 cores), and a Job Object inside | the VM’s cores |
| Windows, container job | --memory, inside what WSL gives its VM |
--cpu-shares |
Mac, --here job |
none: there is no systemd on a Mac, and the job says so | none |
On Linux a job that reaches its cap is stopped whole, not a process at a time: a --here job’s scope has OOMPolicy=kill (its memory.oom.group on systemd older than 253), and the worker kills a container job’s container at the first process the kernel kills in it. The job ends as a cap hit and runs again once with more memory.
On Linux, a job Takt stops (takt cancel, a timeout, a machine stopped) gets TERM first, so its traps and cleanup run, and KILL only for what is still there 10 seconds later: its scope’s TimeoutStopSec, docker stop --time 10 for its containers, and the same for a plain process group. Its log says so as it starts.
Containers a --here job starts
A --here job that runs docker run or docker compose (a benchmark harness, a script that starts a database) does its work in containers the Docker daemon starts, outside the job’s own scope. On Linux, Takt gives such a job a Docker socket of its own (DOCKER_HOST), which passes everything on to the machine’s Docker and changes only how containers are created:
- They start in a slice of the job’s own inside
takt-containers.slice(oncetakt machine setup-interactivehas made it), so systemd-oomd stops them before any agent session andtakt.slice’s cap holds them. - Each is capped at the job’s memory, with no swap beyond it, however much it asks for, and
docker updatecan’t raise that. - They carry the labels
takt.jobandtakt.attempt, and the worker removes them, and the networks the job made, when the job ends, is cancelled, or is reaped after the worker restarts. The job’s slice goes when it ends too, a job run without a coordinator included; the polkit ruletakt machine setup-interactivewrites lets Takt’s user stop these slices and nothing else, so run that command once on each machine. - What they use counts toward the job’s use, and the job and its containers together are held to its cap: over it, both are stopped as a cap hit. A container killed at its cap stops the job too.
Not contained: a client given another host or context (DOCKER_HOST or DOCKER_CONTEXT in the job’s --env, a person’s own Docker context, docker -H), a program that opens /var/run/docker.sock itself, Podman, nerdctl and Buildah, and the build steps of docker build, which the daemon runs in its own processes. Without takt-containers.slice (Docker’s cgroupfs driver, rootless Docker, or the setup not run) the containers stay in Docker’s own cgroup: still capped, labelled and removed, but not counted toward the job. On a Mac, a --here job’s containers run in Docker’s own VM. Access to Docker is access to the machine: this keeps honest work within its limits, and is no sandbox.
On Linux, agent sessions get more: takt agent and takt protect --self put them in takt-agents.slice with a MemoryLow guarantee, jobs run in slices that systemd-oomd stops first, and the parent takt.slice is capped at about 90% of memory. A session that reaches its own MemoryHigh is throttled, not killed: everything in it slows down while the machine may have memory to spare. Takt’s hook then tells the agent which processes in its session use the most memory (see the hook). Its worker reports such a session apart from the machine: the dashboard shows it as a row of its own under the machine (“Claude session · webapp, at its 12G cap · 98% stalled”, its biggest processes once clicked), the machine’s pressure leaves it out, and the machine keeps taking jobs. macOS and Windows have no equivalent mechanism, so there the protection is the jobs’ hard limits. Interactive mode keeps cores and memory free for whoever is at the keyboard.
How machines join and talk
- Approval. A machine running the installer shows a short code; it joins only once someone approves that code on the coordinator’s dashboard or with
takt approve <code>.takt join <host>and a line fromtakt join-commandcarry a one-time token instead, which expires after a day unused. - Tunnels. For
takt join --tunnel, the coordinator puts a key of its own on the host, allowed only to listen on the host’s127.0.0.1:7743: no shell, no pty.takt removetakes it back out. - A pinned key. The installer and every worker connection trust the coordinator’s TLS key, pinned at join time, not its name or address. A machine on your network can’t pretend to be your coordinator.
- Outbound only. Workers dial out to the coordinator and open no ports. Takt uses no SSH.
- Revocation.
takt remove <machine>revokes its token at once, and the worker uninstalls itself when it next connects. - The CLI and MCP reach the coordinator through a local socket on its machine, and with the worker’s token from other joined machines.
Secrets
Secrets are sealed to the one worker that runs the job; the coordinator only relays ciphertext and deletes it when the job ends. See Keep secrets.
Updates
Workers move to the coordinator’s version, and only to it. Where a package manager installed Takt (apt, dnf, pacman, Homebrew), the worker asks that package manager for exactly that version, from the signed repository it already trusts, and never writes over a file the package owns. A whole-machine Linux install’s worker runs as Takt’s account, so it leaves the version it wants in its state folder and restarts; its service’s takt system repair, which runs as root before each start, reads it as a version and nothing else, and asks the package manager for that version of takt alone. Where nothing owns the program, the worker replaces itself: with a release’s build, downloaded from the release and checked against its checksums.txt and that file’s Ed25519 signature, made with Takt’s release key, whose public half each build carries; with a development build, fetched from the coordinator over the pinned connection. A machine on a release never moves to a pre-release on its own.
On Linux, a whole-machine install’s worker service runs takt system repair as root before each start, so a worker that updated puts back the sudo rule, polkit rules and slices its new build expects; it changes only a file that differs from what that build writes. Deploying a build from source with script/deploy-local first runs canary jobs with it on every kind of machine in the fleet, and makes it live only when they pass.