devlog
Diagram of the setup on one Tailscale network: the MacBook and the Mac mini attach to nine named tmux sessions on nas01, which also runs Hindsight and k3s with CI runners; nas01 sends builds to the Mac mini through the eight-verb mac command, and drives the printer Pi, which runs OctoPrint, a camera and a USB server for serial boards and other devices

Nine agent sessions in tmux on one old server, iOS builds on a Mac mini

3 December 2026 · home-lab · teamaicoder/teamai-desktop

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.

The printer camera's view: the print head over the bed of an Elegoo printer, part-way through a rope tidy, with the workshop shelf behind
Frame from ustreamer's /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

A Raspberry Pi 4 Model B in a printed tray, with Ethernet, two USB leads and USB-C power connected
The printer Pi, a 4 GB Pi 4 Model B, photographed on 3 December.

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.

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:

  1. 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.
  2. Build hosts as named tools with a fixed verb list, the way mac works, not a shell.
  3. A Hindsight bank configured per team, so every project tab recalls from the same memory.

Limits

More articles

Yard layouts that know what connects to what: 50 MW of GB300 plant from an ontology
The site-placement tool in sd-dc now generates every cable and pipe link from an ontology of plant classes and relations, re-pairs plant for each layout it tests, and fails a layout where a relation doesn't hold. On a synthetic 50 MW GB300 yard of 124 items, a search took the LV feeder copper from 274.7 t to 85.1 t with all 14 rules passing.
3 Dec 2026 · sd-dc · 5 min read
usbnet: flashing an ESP32 and an Uno on a Raspberry Pi from a Mac
A Raspberry Pi with a USB hub, a small daemon and a Mac CLI: ESP32 boards on the Pi show up on the Mac as rfc2217:// ports that esptool can flash. Arduino Uno uploads with arduino-cli work too. What works from macOS, what doesn't (921600 baud, arduino-cli monitor) and why.
28 Nov 2026 · usbnet · 5 min read
TeamAICoder: 11 merged PRs and a notarised 0.1.0 build
Eleven PRs merged into the TeamAICoder Electron app between 28 October and 9 November 2026, unit tests up from 46 to 141, and a signed, notarised 0.1.0 build in an open PR. Plus sitekit, which generates the crawler files for the project's website.
10 Nov 2026 · teamaicoder · 5 min read
All articles →