Supervised work, not a swarm.
The starting point: a Rex client on a Mac, an always-available cloud VM, and a Talos Linux Kubernetes cluster on a private home LAN. The opportunity is to make the VM a persistent workshop that can reach carefully selected private resources—while the operator can always see and interrupt the work.
Rex contributes remote terminal sessions and automation primitives, not a complete task scheduler. Its CLI and Lua APIs can address servers and panes; assigning tasks, managing retries, recording results, and enforcing budgets remain separate design work.[1]
The first useful task is intentionally small: “Investigate an unhealthy deployment in one namespace. Collect evidence, write a diagnosis, and propose a fix. Do not change the cluster.”
Three places. Clear responsibilities.
The recommended baseline uses host-level Tailscale on the VM. The Mac reaches Rex through SSH over the tailnet. Agent tools use that same host’s private networking to reach a selected Kubernetes API proxy. The public website is documentation only; it is not a route into the agent workspace.
For an initial pilot this can share the website’s VM under a separate workspace account. A dedicated agent VM is the stronger eventual boundary: a public web service and private infrastructure credentials need not share a host. Model-provider calls are separate, explicitly approved outbound traffic—not shown in the topology.
↔ Diagrams scroll horizontally on small screens.
| Component | Owns | Does not own |
|---|---|---|
| Mac / operator | Task brief, review, interruption, approval. | Keeping remote work alive. |
| VM / Rex workspace | Interactive processes, worktrees, local task files, evidence. | Automatic failover or Kubernetes authorization. |
| Host Tailscale | VM identity and permitted private paths. | Per-pane identity or tool-level permissions. |
| Operator + API proxy | Private API exposure and caller identity mapping.[4] | Replacing Kubernetes RBAC. |
| Talos / Kubernetes | Selected services; later, isolated batch Jobs. | A general-purpose host for Rex. |
Two kinds of access.
Rex’s embedded Tailscale integration registers Rex itself as a tailnet device. It can coexist with a system Tailscale installation as a separate identity. The crucial design distinction: don’t assume that an embedded Rex endpoint also routes ordinary child processes to your homelab.[2]
BASELINE / FEWER MOVING PARTS
One host-level connection.
Install Tailscale on the VM. Use a dedicated workspace device tag. Reach its Rex server through ordinary SSH over the tailnet, keeping Rex off the public listener.
- Mac → VM: SSH, then the Rex session.
- VM → home: selected API proxy only.
- No Rex embedded identity required.
OPTION / SEPARATE SERVICE IDENTITY
Add Rex’s own endpoint.
Use Rex’s native Tailscale connection for the cockpit, while retaining host-level Tailscale for tools that need private network access.
- Two devices, keys, and policy surfaces.
- Useful if cockpit access needs separate policy.
- Does not isolate agents from one another.
One task, end to end.
The session is the live window into the work. A small, explicit task record is the durable account of what was requested and what happened. An agent saying “done” is not sufficient evidence of success.
A SMALL TASK ENVELOPE
Make the brief explicit.
Record task ID, objective, namespace, allowed tools, workspace, session ID, deadline, and a token or spend ceiling where the runtime supports it. Start with files, not a distributed queue.
A RESULT, NOT JUST A PROMPT
Make completion verifiable.
Save timestamped observations, commands and exit codes, evidence references, diagnosis, uncertainties, and a proposed patch. Mark the task needs_review, blocked, or failed.
Use a separate Git worktree for coding tasks. Keep credentials out of task files and redact sensitive logs before persisting or sending them to a model. A later Shelley bridge could invoke the Rex CLI against named sessions; that would be an explicit integration, not automatic conversation sharing.
Connectivity is not permission.
Use several narrow gates instead of treating “on my tailnet” as sufficient authorization. Tailnet grants, Kubernetes RBAC, and process isolation answer different questions.[5]
| Boundary | Allow in the pilot | Keep out |
|---|---|---|
| Operator → workspace | Authorized personal device/user to VM SSH; private Rex access. | Public Rex TCP listener. Unrestricted tailnet-wide access. |
| Workspace → home | Workspace device tag to API proxy on the required service port. | Default access to every home device. Unnecessary service exposure. |
| Proxy → Kubernetes | Explicit identity mapping and namespace RoleBinding. Read selected deployments, ReplicaSets, pods, events; get pod logs. | Admin kubeconfig, Secrets, exec, attach, port-forward, writes, or unreviewed inherited bindings. |
| Agent → VM | Dedicated unprivileged workspace account, controlled files and credentials. | Reusing a sudo-capable operator account as “isolation.” Access to the site’s deployment files. |
| Later batch workers | Separate runner identity and namespace, quotas, resource limits, restricted images, runtime and cleanup limits. | Giving the diagnostic identity permission to create arbitrary pods or Jobs. |
Validate both positive and negative cases: permitted resource reads succeed; Secret reads, exec, writes, and unrelated network targets fail. Review existing tailnet policy and inherited RBAC grants—adding a narrow rule does not remove an older broad one.
Human approval must be enforceable. A prompt saying “ask first” is not a write barrier. In a later phase, keep deployment credentials in a separate human-operated or approval-gated runner. The diagnostic process should not be able to grant itself more access.
Earn the next layer.
Each stage should answer a question before adding another control plane. Only the design is being published here; none of these infrastructure steps are implied to be installed.
PERSISTENCE
Prove the remote workshop.
Install a personal Rex server under the intended unprivileged workspace account. Enable the personal server’s systemd user activation and lingering for the workspace user—not the separate shared-server units. Connect from the Mac over private SSH, run a long task, close the client and the last SSH login, and reconnect. Do not stop the server during this test. Rex documents the personal SSH mode and systemd activation path; Linux support is currently marked “Testing,” so verify the installed versions before relying on it.[6]
Pass: the same process and output remain accessible after laptop disconnect.
PRIVATE READS
Investigate one namespace.
Enroll the VM with a purpose-specific tag. Configure or reuse the Kubernetes operator API proxy in authenticated mode, not noauth. Verify the tagged VM’s effective user/group mapping, bind only the intended diagnostic identity to a narrow role, and test deny cases. Run one read-only investigation against a known, non-sensitive test workload.
Pass: useful evidence and diagnosis; prohibited API actions and unrelated network paths denied.
OBSERVABILITY
Make handoff boring.
Add task/result files and a small Rex CLI adapter. Exercise manual intervention and cancellation. Optionally adapt agents to Rex’s program-status protocol so blocked and completed work becomes visible; status emission is an integration task, not automatic task validation.[7]
Pass: an interrupted operator can reconstruct the task, review evidence, and stop its work.
BATCH COMPUTE
Borrow the cluster, selectively.
Introduce an approval-gated runner with a constrained Job template in a separate namespace. Configure service accounts, admission restrictions, egress, quotas, timeouts, artifact collection, and cleanup before granting submission capability. Keep interactive Rex on the VM.
Pass: one reproducible test Job returns an artifact, respects limits, and can be cancelled independently.
Design for the unglamorous bits.
LAPTOP OFFLINE
Disconnect ≠ stop.
Work continues only while the remote VM and server remain alive. VM reboot, server shutdown, or pod replacement is not live-process persistence. Checkpoint to files; do not promise transparent resume.
CLUSTER UNHEALTHY
The bridge may fail too.
An in-cluster API proxy depends on the cluster. Keep a separate trusted administrative recovery path from the Mac. Do not make the agent VM or the proxy the only way to repair the homelab.[4]
STOPPING WORK
A dead pane isn’t a kill switch.
Revoke the relevant API binding or network grant to cut access; stop the process tree to stop local work. In later phases, explicitly cancel Jobs already submitted. Revocation does not undo completed changes.
SENSITIVE OUTPUT
Private network, public model?
Logs may contain secrets even without Secret API access. Decide which model endpoints may receive evidence, redact output, set retention, and review artifacts before sharing. Never publish real credentials or private topology in these notes.
Decisions still worth making.
Should Rex itself run in the Talos cluster?
Not for the first experiment. Talos is an API-managed, minimal host OS, not a conventional SSH application server.[8] A purpose-built Rex container might be possible, but would need testing of PTYs, shutdown, workspace storage, and identity persistence. A persistent volume retains files—not live sessions after a pod replacement. Keep the interactive workshop outside the system it diagnoses.
Use embedded Rex Tailscale, host Tailscale, or both?
Start with host-level Tailscale plus SSH to Rex. It covers both operator access and ordinary tool networking with one VM identity. Trial the embedded endpoint later if separately managed cockpit identity or connection ergonomics justify the extra device and keys. Verify the installed Rex version’s behavior before choosing.
Can multiple agents share this VM?
Yes as a convenience experiment for equally trusted work, with separate sessions and worktrees. Not as a claim of isolation. Before mixing credentials or trust levels, introduce real sandbox boundaries and separate identities. In the proposed design, do not let a workspace agent modify the public website or access the operator’s sudo credentials.
When does a dispatcher become worthwhile?
When repeated manual task launch and result collection become the bottleneck. Then add a thin queue, leases, structured status, per-task budgets, and explicit cancellation. Keep that coordinator outside Rex’s terminal abstraction; do not mistake terminal state for task state.
References & assumptions.
This is a proposed composition of documented capabilities, not a vendor-supported reference deployment. Home cluster version, existing operator configuration, tailnet policy, installed Rex versions, and model/runtime choices have not been inspected. Validate them before implementation.
- [1]Rex · CLI automation ↗
Remote targeting, session and pane control, and automation primitives.
- [2]Rex · Remote access ↗
SSH connections, embedded Tailscale, separate device identity, and coexistence with system Tailscale.
- [3]Tailscale · Kubernetes operator ↗
Expose selected workloads and the Kubernetes API over the tailnet.
- [4]Tailscale · Kubernetes API server access ↗
API proxy authentication, identity mapping, authorization, and availability considerations.
- [5]Tailscale · Grants ↗
Explicit access policy. Network reachability is distinct from application authorization.
- [6]Rex · Linux server modes ↗ · Linux installation ↗
Personal SSH mode, systemd activation, persistence, and Linux support caveats.
- [7]Rex · Program Status Protocol ↗
Explicit status signals for working, blocked, and completed programs.
- [8]Sidero Labs · Talos Linux ↗
API-managed Kubernetes operating system; no conventional host shell or SSH daemon.
Written November 14, 2026 · Design v0.1
Published as a static document. No credentials, private addresses, or live control surfaces are included.
← Back to experiments