Nine agent sessions in tmux on one old server, iOS builds on a Mac mini
Every Claude Code session I run now lives in a named tmux session on nas01, an old server with a 16-thread Xeon Silver 4208 and 78 GiB of RAM. Nine projects, nine sessions: eight moved over on 28 November, the last today. A Mac mini does the iOS builds and shows one iTerm pane per session. A Raspberry Pi runs the 3D printer. All of it shares one Tailscale network and one Hindsight memory bank, and closing the laptop ends nothing.
The machines
| Machine | Job | Runs |
|---|---|---|
| nas01 | Agent sessions, k3s, CI runners, memory | tmux, Claude Code, k3s v1.36.4, Hindsight 0.10.0 in Docker |
| Mac mini | iOS and macOS builds; the screen I watch sessions on | Xcode 27.2, Flutter 3.41.6, iTerm |
| Printer Pi | The 3D printer | Raspberry Pi 4 Model B, OctoPrint 1.11.8, a USB webcam streamed as MJPEG by ustreamer |
| MacBook | Travel, desktop FreeCAD | iTerm, ssh |
Agents spend most of their time waiting on a model or a test run. What they need is memory and a process that survives my laptop sleeping. An old server has the first, and tmux gives the second.
One tmux session per project
A project's session is named after the project and started by a 30-line
script, cc. Every iTerm pane on the Mac mini runs ssh -t nas01 cc <project>:
if ! tmux has-session -t "=$name:" 2>/dev/null; then
tmux new-session -d -s "$name" -c "$dir" "$RUN"
else
# After a reboot tmux-resurrect brings the session back as a bare shell: restart Claude in it.
start=$(tmux display-message -p -t "=$name:" '#{pane_start_command}')
[[ $start == *cc-run* ]] || tmux send-keys -t "=$name:" "exec $RUN" Enter
fi
cc-run runs claude --continue in a loop, so the pane resumes the
project's last conversation, and Claude exiting leaves the session in place.
cc -l lists the projects and marks the ones with a running session.
The names do more work than I expected. tmux ls is the list of what I'm
working on, and the status bar shows nas01:sd-dc, so I know which agent I'm
typing at. From ~/.tmux.conf:
set -g set-clipboard on # OSC52 copy to the Mac clipboard (iTerm2)
set -g status-left "#[fg=colour39,bold] #h:#S #[default]"
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
set -g @continuum-boot 'on'
tmux-resurrect and tmux-continuum save every 15 minutes and restore on boot.
They bring back the session and its pane text, not the Claude process; cc
restarts that on the next attach.
Moving a session is cheap. On 3 December I moved the 3D printing session off
the MacBook: copied the repo and the conversation transcript to nas01,
installed OrcaSlicer 2.4.2 and FreeCAD 1.1.4 there, and attached to it as
3dprint. A test slice of the same part gave 48 m 44 s and 7.57 g on nas01
against 48 m 47 s and 7.57 g on the Mac.
k3s beside the sessions
The sessions run on the host, not in pods. k3s on the same box runs what the projects deploy, and three actions-runner-controller scale sets, each from 0 to 3 or 4 runners, so CI for those repos uses nas01 rather than hosted minutes. Kubeconfig and other credentials reach the sessions from 1Password through a read-only service account.
The Mac mini as a build host
Xcode only runs on macOS. Since 26 November the Mac mini does every iOS build.
Agents on nas01 reach it through one script, mac, using a key whose
authorized_keys entry forces a command, mac-agent, that accepts a fixed
list of verbs:
mac build <app> <ref> <ios|macos|apk|test|analyze> [--release|--debug|--profile]
mac artifacts <app> [local-dir]
mac release <app> <dev|prod> [--dry-run]
build takes a pushed GitHub ref into a clean checkout and builds unsigned.
release does a signed TestFlight upload, with a signing keychain that is
unlocked only for that run. An agent can't get a shell on the Mac. The Mac
has no Android SDK, so apk builds fail there for now.
The printer
OctoPrint runs on the Pi with a USB webcam behind ustreamer. The 3dprint
session slices on nas01, then reaches the Pi through an ssh alias and drives
OctoPrint's API from there, so the API key stays on the Pi.

/snapshot on the Pi, 13:01 on 3 December (Hobart), with rope_tidy_v3-PLA.gcode at 47% and 29 minutes left according to OctoPrint's job API.The same Pi is a USB server

The printer Pi also shares the USB devices on its hub, which is what
usbnet was written
for. Two services split the work by device class, and at start-up a script,
usbip-autobind, decides which one gets each device:
# Stays local: hubs, cameras (UVC), USB serial devices (published over RFC2217 by usbnet-gw instead),
# and anything listed in /etc/usbnet/exclude.
# Force a serial device onto USB/IP instead: list its vid:pid in /etc/usbnet/usbip-force.
- Serial boards (ESP32, Uno) are published by
usbnet-gwasrfc2217://ports, because macOS has no USB/IP client. esptool and arduino-cli on a Mac open them as network ports. - Everything else goes to
usbipdover USB/IP, for Linux clients such as nas01. On 3 December that was one Toshiba USB drive. - Kept local: the webcam, the printer's CH340 serial adapter, which
OctoPrint holds as
/dev/printer, and a USB missile launcher, whichusbnet-gwdrives over HTTP on port 3241.
One memory for every session
Hindsight runs in Docker on nas01 on port 8888, bound to localhost and the
tailnet address. Claude Code's hindsight-memory plugin recalls observations
into each turn and keeps the conversation every 10 turns, all in one bank.
A session in one project can recall a decision made in another: today the
sd-dc session told me the Mac mini's Xcode and Flutter versions and how
mac release signs, none of which was set up in sd-dc.
Into TeamAICoder
TeamAICoder already gives each project its own terminals and a browser preview (earlier post). This setup points to three changes, none built yet:
- A terminal tab that attaches to a named tmux session on a remote host, so the app is a window onto sessions that outlive it.
- Build hosts as named tools with a fixed verb list, the way
macworks, not a shell. - A Hindsight bank configured per team, so every project tab recalls from the same memory.
Limits
- One box. nas01 holds every session, the cluster and the memory bank. I haven't tested restoring the Hindsight bank onto another machine.
- No alerting when a machine drops off the tailnet.
- The obvious objection is a cloud dev box. I already own the RAM, and the printer and the Mac mini have to be in the house anyway.