The knowledge base and the maintenance procedure for Yaroslav's agents on the AI Foundry lab machines (aifoundry1–3
at Studio 45), and since Fri 9 Oct 2026 on a fourth machine, mordast, on another tailnet. The design principle: every machine has an agent, and he can reach each one from his phone. Point
any agent here to make sure all six Claude accounts, Antigravity and Codex run on all three machines, and to bring back
whatever is not live. To do something similar on your own machines, point your agent here too. Written Wed 7 Oct 2026
(week 41) on the Intel; Codex added the same afternoon from aifoundry2. Live state: the
agents dashboard. This page and the dashboard are public:
anyone with the link can open them, though neither is listed. This page is the published copy of MAINTENANCE.md in
his aifoundry-setup repo, which stays private because it holds email addresses. So the files named here
(LESSONS.md, the why behind each piece; RESTORE.md, rebuilding a wiped machine; README.md; HOSTS.md) are
not linked.
1. The target: thirty-one agents on four machines
🛑 An account is its KEY, and no name carries an account number (his ask, Tue 13 Oct 2026, week 42: "can you do
a refactor where you drop the numbers? IE, I want claude-yaroslavvb3-gmail not claude3-yaroslavvb3-gmail. I still
have an ordering, but the ordering is implicit. The reason is that I may add or remove some accounts, and the numbers
leave gaps"; scope he chose, "Everything, by name"). The key is the email's local part with .→-, plus -, plus
the first label of the domain; the home is ~/.claude-<key> and the tmux session claude-<key>. The rows below are
in the table's order, and that order names nothing — re-ordering it changes nothing on disk.
| aifoundry1 | aifoundry2 | aifoundry3 | mordast | |
|---|---|---|---|---|
yaroslavvb-gmail (yvb): yaroslavvb@gmail.com, home ~/.claude-yaroslavvb-gmail, tmux claude-yaroslavvb-gmail:rc |
Remote Control server | Remote Control server, plus the pinned session ed6d06d5 in claude-yaroslavvb-gmail:main |
Remote Control server | Remote Control server |
yaroslavvb2-gmail (yvb2): yaroslavvb2@gmail.com, home ~/.claude-yaroslavvb2-gmail, tmux claude-yaroslavvb2-gmail:rc |
Remote Control server | Remote Control server | Remote Control server | Remote Control server |
yaroslavvb3-gmail (yvb3): yaroslavvb3@gmail.com, home ~/.claude-yaroslavvb3-gmail, tmux claude-yaroslavvb3-gmail:rc |
Remote Control server | Remote Control server | Remote Control server | Remote Control server |
yaroslavvb-mlcollective (mlc): yaroslavvb@mlcollective.org, home ~/.claude-yaroslavvb-mlcollective, tmux claude-yaroslavvb-mlcollective:rc |
Remote Control server | Remote Control server | Remote Control server | Remote Control server |
yvb-agent-spacesheep (sheep): yvb-agent@spacesheep.dev, home ~/.claude-yvb-agent-spacesheep, tmux claude-yvb-agent-spacesheep:rc |
Remote Control server | Remote Control server | Remote Control server | Remote Control server |
yaroslav-nekko (nekko): yaroslav@nekko.ai — 🛑 PLACEHOLDER, machines = - |
— | — | — | — |
Antigravity: one Google account per machine, ~/.gemini, tmux agy:rc, agy 1.3.5 and full turbo (agy-turbo check) everywhere since Wed 14 Oct 2026 |
Google account 1, yaroslavvb@gmail.com |
Google account 2, yaroslavvb2@gmail.com |
Google account 3, yaroslavvb3@gmail.com |
installed Wed 14 Oct 2026, on his ask; the Google account he signs in |
Codex: ChatGPT account yaroslavvb@gmail.com (Pro), ~/.codex, no server of its own |
sessionpipe's hooks approved; spacesheep reaches it | the same | the same | — |
Devin: yaroslavvb@gmail.com (Max), the devin CLI, and a personal outpost (devin-worker.service) |
signed in, outpost aifoundry1 |
signed in, outpost aifoundry2 (since 9 Oct) |
signed in, outpost aifoundry3 |
signed in, outpost mordast |
Each machine's target is TARGETS in bin/aifoundry-agents. mordast (since Fri 9 Oct 2026) is not a lab machine:
it is on another tailnet, its user is yaroslav (home /home.local/yaroslav), and it runs the Claude accounts,
Devin and, since Wed 14 Oct 2026, Antigravity (his ask: "upgrade Antigravity on all the machines, including
Mordast"; it had none). No Codex there.
The count: 31. Each lab machine runs 8 (5 Claude + Antigravity + Codex + Devin), so 24, and mordast runs 7
(5 Claude + Antigravity + Devin). The nekko row is never a fault anywhere: its key, home name and tmux name are reserved, it
is never signed in and never served, because he has no Claude Pro on it (his words, Sun 11 Oct 2026: "I actually
don't have Claude Pro, so don't sign into the Necko AI. Keep it as a placeholder.").
Two accounts joined on Sat 10 Oct 2026 (week 41), his ask: every account reachable from its own phone, on every machine but the M5 (that one is his laptop, where Claude is the desktop app). The names then moved three times in four days, so read any older doc by its EMAIL, never by its number:
| homes | when | why |
|---|---|---|
~/.claude + ~/.claude-yv2 … -yv5 |
to Sat 10 Oct 2026 | -yv4 said nothing about whose login it held, and three homes turned out to hold the wrong account |
~/.claude-<key> |
Sat 10 Oct 2026 | "the .claude-yv4 should have enough information to figure out original account". That afternoon ~15:40 PDT the numbers 4 and 5 swapped accounts |
~/.claude<n>-<key> |
Sun 11 Oct 2026 | "uniform naming for all Claude home directories" — the bare ~/.claude stopped being an account at all |
~/.claude-<key> |
Tue 13 Oct 2026 | the numbers dropped: "I may add or remove some accounts, and the numbers leave gaps" |
A machine on any earlier generation is moved over by claudes homes migrate then --apply --retire-old
(LESSONS.md §1.1): it moves each home by the login it holds, carries that login with it, splits the shared
~/.claude's own login out into its keyed home, and deletes nothing.
The accounts are not written in any script. They come from one table, claude_accounts.tsv: authored in
flush-util on the Macs, shipped byte-identical to ~/.config/claude-accounts.tsv on each machine (MANIFEST, and
aifoundry-agents install), and read there by bin/claudes and bin/aifoundry-agents — each keeping only the rows
whose machines column names that machine. aifoundry_agents install on the Mac compares the two copies' shasum
and refuses to ship on a mismatch. Each script keeps a copy of the table as a literal, used only when the file
cannot be read at all — a table that parsed and names no account for this machine means it serves none. To add or
move an account: edit flush-util's copy, cp it into this repo, commit, install.
How he reaches them:
- Claude: the Claude app signed in as that account (phone, claude.ai/code, Desktop) lists every machine by its host
name. A new session runs in
~/claudein bypass-permissions mode; Ultracode shows in the effort menu once it runs. - Antigravity: https://antigravity.google.com, signed in as the machine's Google account, lists that machine. One account per machine is his decision (4 Oct 2026; confirmed 7 Oct: "I'll just have one account Antigravity per box"). Putting several accounts on one machine is designed but not built (LESSONS.md §5.8).
- Codex: from spacesheep.dev, by messaging the machine: sessionpipe's control daemon (a systemd user service, paired
with spacesheep on every machine) starts
codex execin~/claude, in auto mode (--approve-for-me). sessionpipe's hooks, approved in Codex, report every Codex session to spacesheep, wherever it was started. At a terminal:ssh aifoundryN, thencd ~/claude && codex. Codex's owncodex remote-control(for the ChatGPT phone app) is experimental and not set up (LESSONS.md §7.5). - Devin: https://app.devin.ai, signed in as
yaroslavvb@gmail.com: start a session and pick the machine's outpost (aifoundry1,aifoundry2,aifoundry3ormordast). An outpost runs one session at a time, and an idle session holds it until it is archived. At a terminal:ssh <machine>, thencd ~/claude && devin(the first run there asks him to trust the folder). sessionpipe's devin hooks save the CLI's sessions to spacesheep; web sessions on an outpost are not saved (LESSONS.md §8).
State on Sat 10 Oct 2026 (week 41), midday PDT: the target became 26. Claude accounts 3 and 4 are deployed on all
four machines and signed out everywhere — his sign-in, one browser per account (claudes login 3, claudes login 4, or aifoundry_agents fix). Accounts 1 and 2 are untouched and still live on aifoundry1–3. On mordast,
account 1's home holds yaroslavvb2@gmail.com (WRONG ACCOUNT since ~10:04 that morning) and account 2 is signed
out: both are a sign-in in the right browser, and nothing on that machine will start a server until the email
matches.
State on Fri 9 Oct 2026, 17:3x PDT: 16 of 18 live. Devin runs on all four machines (aifoundry2 and mordast since
9 Oct); mordast's two Claude accounts wait for his sign-in and first-run answers (aifoundry_agents fix mordast).
State on Wed 7 Oct 2026, 15:40 PDT: 12 of 12 live. Both Claude accounts and Antigravity run on all three machines
(the Claude servers on aifoundry1 and aifoundry3 since 14:12). Codex 0.161.0 is installed on all three, sessionpipe's
twelve hooks are approved in it (his ask: "Make sure codex is installed on all of the machines … and sessionpipe
approved"), and he signed it in to ChatGPT at 15:22 (device codes). A test session on each machine ran a command and
reported to spacesheep. Still open, his and needing root: Codex's sandbox cannot start for unconfined programs, such
as sessionpipe's daemon (§5, sandbox blocked), so until setup/codex-apparmor.sh runs on a machine, each command
there runs outside the sandbox after an automatic review.
2. How it stays up through a restart
- Watchdogs. On each machine, cron runs
claudes up --quietandagys up --quietevery minute. They start only what died: a Remote Control server, the pinned session, the Antigravity daemon. They also restart a server or daemon whose binary an auto-update deleted; for Antigravity, also one left on theagy.<n>.oldan update keeps, once no dashboard task is running (agys busy; since Wed 14 Oct 2026). After a reboot everything is back within about a minute; aifoundry2 showed it on Tue 6 Oct 2026 at 16:06–16:08. An account whose home holds another account's login gets no server: since Sat 10 Oct 2026claudes upstops the one it finds (by its own pid) and closes itsrcwindow, andclaudes servewaits, re-reading once a minute, instead of serving — one WRONG ACCOUNT line per state change, not one a minute (LESSONS.md §1.8; the Mac'sclaude_rc_keepalivecheck_account()/serve() is the same gate). An answer nobody can read (claude auth statustiming out) blocks nothing. - Linger is on (
loginctl enable-linger; on mordast he can turn it on himself, no root), so tmux and everything in it survive the last ssh logout. Without it, a 12-minute Tailscale outage killed every Claude on 23 Sep 2026.nodewatch(cron) logs why tmux or Claude disappeared. - Logins are files, not a keyring. Claude's is
<home>/.credentials.json(mode 600). Antigravity's is~/.gemini/antigravity-cli/antigravity-oauth-token; every agy runs withDBUS_SESSION_BUS_ADDRESS=disabled:. So nothing needs a person after a reboot. - What still needs a person:
- Claude's login lapses about 30 days after it was given (
refreshTokenExpiresAt), and aclaude setup-tokencannot run Remote Control. The dashboard warns 7 days ahead, andaifoundry_agents fixoffers the renewal. Lapse dates on 7 Oct: aifoundry2 Tue 27 Oct (account 2) and Wed 28 Oct (account 1); aifoundry1 and aifoundry3 Sun 1 – Tue 3 Nov. - A new machine's or account's first-run answers: the welcome screens, trust in
~/claude, and "Enable Remote Control?". - A machine that is off. The lab has no remote console.
- Devin: the sign-in, once per machine (
devin auth login --force-manual-token-flow: a link, then a one-time code), and trusting~/claudethe first time he runsdevinthere. - Pairing sessionpipe with spacesheep.dev, once per machine: a six-digit code typed at spacesheep.dev/pair on the
device that holds his passkey, within 10 minutes (
aifoundry_agents fixstarts it). - Codex: the ChatGPT sign-in, once per machine, and approving sessionpipe's hooks again whenever they change. Codex
records each approval against a hash of the hook, so a sessionpipe update that rewrites
~/.codex/hooks.jsonmakes them "modified", and Codex skips them until they are approved again (dashboard: Hooks to approve).
- Claude's login lapses about 30 days after it was given (
- The dashboard's stream is a systemd user service,
spacesheep-stream-aifoundry-agents.service(Restart=always,StartLimitIntervalSec=0), so it also comes back by itself. Devin's outpost is the systemd user servicedevin-worker.service(Restart=on-failure). - The Intel watches from outside (since Fri 9 Oct 2026): flush-util
aifoundry_agents_watchdog, every 10 minutes, reads each machine's stream, runsaifoundry-agents fixover ssh when something an agent can fix stays broken, and tells him on Telegram what needs him. - The lab dashboard (the lab repo's
tools/lab/dashboard, since Thu 8 Oct 2026): its collector is the cron line# lab-dashboardon aifoundry2, with aifoundry3 as a standby (the same line,"standby_after_min": 90, and the dashboard's own deploy key in~/.config/lab-dashboard/spacesheep/), and a keeper beside each, the systemd user servicelab-dashboard-keeper.service(streamaifoundry-dash/<host>, every minute), which puts back a lost cron line. The history page's cron line (# lab-history, aifoundry2) runs every 15 minutes since that day. - Codex has no server to keep up. sessionpipe's control daemon, which lets spacesheep start Codex (and message the
other agents' sessions), is the systemd user service
sessionpipe-control.service, restarted on failure. Codex updates itself through its standalone installer (codex doctor: "update action standalone installer"). Its login is the file~/.codex/auth.json; Codex refreshes it during use. How long an unused login lasts is not documented, so the dashboard shows when it was last refreshed.
3. The dashboard
Yaroslav's AI Foundry agents shows every agent, one card per machine. Tap an agent to see its state, the command that fixes it, and a prompt to hand to an agent. The lab dashboard and the AI Foundry hub link to it.
- Where the data comes from: every 15 s each machine runs
aifoundry-agents status --jsonand pushes the result (about 1 KB) to the spacesheep streamaifoundry-agents/<host>. The page draws the four streams. The value stays"schema": 1, because the page draws nothing else: new fields are additions (hl,live,of,needandagentslead the value, thendevinandsp). The machines push rather than a Mac polling them, because the Macs' ssh to the lab needs a browser check every few hours (§8). - It is public and unlisted, by his choice. So the stream carries account numbers, never account names, session
ids, process ids, paths or tokens.
public()inbin/aifoundry-agentsdrops the private keys. Keep it that way. - "No reading" for more than 3 minutes means the machine is off or offline, or its stream service stopped. The lab
dashboard's live section tells the two apart, because it streams separately (
aifoundry/<host>, every second). - Source:
dashboard/index.htmlin this repo. To update it, deploy it to space35a4e378-176f-4457-bed7-ea4dee096ce2(stage +deploy, orspacesheep deploy dashboard/index.html --space 35a4e378-176f-4457-bed7-ea4dee096ce2). Check afterwards that it is still public and unlisted (get_space:visibility public,listed false); a redeploy has flipped pages before. - This file's published copy,
agentic-setup.html: after editing this file, regenerate it withpython3 tools/md2page.py MAINTENANCE.md agentic-setup.html agentic-setup.htmland deploy it to spacefe88dcf6-2763-469f-9daf-b51452e94050(spacesheep deploy agentic-setup.html --space fe88dcf6-…), then delete the.spacesheep.jsonthat a deploy leaves in the folder. It is public (anyone with the link, not listed) since Wed 7 Oct 2026, his choice: he pointed the lab's Discord at it (#community-lab) so others can copy the setup. It names his accounts by email, which he chose to keep. Never link into this repo from it: the repo stays private, because it holds email addresses, so those links open nothing for anyone else.
4. The procedure, for an agent pointed here
- Look. Read the dashboard, or run
~/git0/flush-util/aifoundry_agents statuson a Mac, orssh aifoundryN ~/.local/bin/aifoundry-agents statusfrom a lab machine. Each agent is live, or it has a state and the command that fixes it. - Fix what needs nobody (§5, "anyone" rows): watchdogs, the stream, a dead server or daemon, a disconnected daemon, scripts out of date.
- Never do his steps. The first-run answers, every sign-in and approving Codex hooks are his. The agents' own
safety checks refuse them anyway, and a sign-in code pasted into a chat ends up in the session log, which
sessionpipe mirrors to spacesheep. (
codex-hooks trust --yesis for when he asked for the approval in his own words, as on 7 Oct.) - Hand him his steps in one message that ends your turn. Usually that is one command, run at a terminal on the
Intel or the M5:
~/git0/flush-util/aifoundry_agents fix <machines>. It asks before each step and prints any sign-in link he needs to open. - Verify on the dashboard: every agent live, and no warnings on the machine cards.
- If you changed a script: commit in aifoundry-setup, push (from aifoundry2, or from a Mac clone), then run
~/git0/flush-util/aifoundry_agents install(§6). On aifoundry2, run~/claude/aifoundry-setup/snapshot.sh --commit. A lesson that cost real time goes into LESSONS.md, linked from here only if it changes the procedure.
Run the session on aifoundry2 in ~/claude (the lab door), or on the Intel in ~/git0/gyroscope (the private door)
when aifoundry2 itself is down. A Claude session started by a machine's Remote Control server must never stop that
server. An Antigravity task must never restart its own daemon.
5. Runbook: every state and what fixes it
On a machine the commands live in ~/.local/bin; over ssh, spell the path out: ssh -t aifoundry1 ~/.local/bin/aifoundry-agents consent yvb2.
| State | What it means | Who | Fix |
|---|---|---|---|
| No reading | The machine is off or offline, or its stream service stopped | anyone, then him | ssh aifoundryN uptime. If it answers: ssh aifoundryN ~/.local/bin/aifoundry-agents stream install. If not, it is down: there is no remote console, so ask Roman or #community-lab to power it on |
| Claude · First run | Signed in, but the first-run answers are missing, so no server can start (LESSONS.md §1.7) | him | aifoundry_agents fix aifoundryN, or aifoundry-agents consent <handle> on the machine (a handle, key or email — 🛑 a bare number is refused, with the account it used to mean). By hand: tmux attach -t '=claude-yaroslavvb-gmail' (that account's own session: claude-yaroslavvb2-gmail … claude-yvb-agent-spacesheep; claudes status prints it), answer, /exit, y to "Enable Remote Control?", then Ctrl-b d |
| Claude · Signed out | No login on the machine, or it lapsed | him | aifoundry_agents fix aifoundryN. It runs claudes login <handle> and prints the claude.ai link: open it signed in as that account, and paste the code back. Renewing drops that account's server for about a minute |
| Claude · Wrong account | The home is signed in to another Claude account | him | claudes login <handle> in a browser signed in to claude.ai as that account — the login follows the browser, not the --email it is given (LESSONS.md §1.8). claudes login prints which account that must be, and aifoundry-agents checks the email as soon as the login lands |
| Claude · Down | Signed in and answered, but no server is running | anyone | Wait a minute for the watchdog, then claudes up. Read tmux capture-pane -p -t '=claude-yaroslavvb-gmail:rc' (that account's own session, from claudes status; the quoted = is what makes the target exact, because tmux matches prefixes) and claudes status |
| Claude · Connecting | The server runs but has no connection to claude.ai | anyone | Give it two minutes. Then read the pane, and check the machine's network (tailscale status, DNS) |
| Claude · full (warning) | 64 of 64 sessions, so the app says "disconnected" | anyone | End old phone workers by pid, from claudes status (LESSONS.md §2.3) |
| Claude · lapses in under 7 days (warning) | The login lapses soon | him | aifoundry_agents fix aifoundryN offers the renewal |
| Antigravity · Signed out | ~/.gemini holds no login |
him | aifoundry_agents fix aifoundryN. It runs agys login and prints the Google link: open it as the machine's Google account (§1), and paste the code back. By hand: agys login, then agys code CODE |
| Antigravity · Wrong account | Signed in to a Google account other than the machine's | him | agys stop, remove ~/.gemini/antigravity-cli/antigravity-oauth-token, then agys login |
| Antigravity · Down | Signed in, no daemon running | anyone | Wait a minute for the watchdog, then agys up, and read tmux capture-pane -p -t agy:rc |
| Antigravity · Disconnected | The daemon runs, but its last logged connection status is not "Connected" | anyone, but never an Antigravity task on that machine | agys restart |
| Antigravity · turbo not fully on (warning) | agy-turbo check fails: some setting or rule is missing, so dashboard tasks stop to ask (before 14 Oct 2026 this checked the preset only, and reads outside the workspace still asked) |
him (it restarts the daemon) | agy-turbo shows which; agy-turbo on (refused while a task runs, unless --now), or answer yes in aifoundry_agents fix |
| Antigravity · old binary (warning) | The daemon runs an agy binary an update replaced (agy.<n>.old) |
anyone | Nothing: the watchdog restarts it on the new binary once idle. To upgrade on purpose: agys update |
| Codex · Signed out | No ~/.codex/auth.json |
him | Once per ChatGPT account, turn on device code login (chatgpt.com → Settings → Security). Then aifoundry_agents fix aifoundryN, or ssh -t aifoundryN ~/.local/bin/codex login --device-auth: open the link it prints, sign in to ChatGPT, enter the one-time code. It waits in the terminal until done |
| Codex · Hooks to approve | sessionpipe's hooks are new or changed, so Codex runs none of them and its sessions go unreported (LESSONS.md §7.2) | him | aifoundry_agents fix aifoundryN, or ssh -t aifoundryN ~/.local/bin/aifoundry-agents codex-hooks trust: it lists the hooks and asks, then approves sessionpipe's and no others, as Trust in Codex's /hooks does |
| Codex · Not reporting | sessionpipe's hooks are missing from ~/.codex/hooks.json |
anyone | ssh aifoundryN ~/.local/bin/aifoundry-agents fix (it runs sessionpipe install --codex --backfill 0), then the hooks wait for his approval |
| Codex · Down | sessionpipe's control daemon is not active, so spacesheep cannot start Codex here (nor message the other agents' sessions) | anyone | ssh aifoundryN systemctl --user restart sessionpipe-control.service; its log: journalctl --user -u sessionpipe-control.service -n 30 |
| Codex · Not installed | ~/.local/bin/codex is missing |
anyone | OpenAI's standalone installer, read first: curl -fsSL https://chatgpt.com/codex/install.sh -o /tmp/codex-install.sh && CODEX_NON_INTERACTIVE=1 sh /tmp/codex-install.sh (it checks each download's sha256), then aifoundry-agents fix |
| Codex · Unknown | codex app-server did not answer when asked for its hooks |
anyone | codex doctor |
| Devin · Signed out | No Devin login on the machine | him | aifoundry_agents fix <machine>: it runs devin auth login --force-manual-token-flow, which prints an app.devin.ai link; open it signed in to Devin as yaroslavvb@gmail.com and type the one-time code it shows (5 minutes) |
| Devin · Not reporting | sessionpipe's devin hooks are missing from ~/.config/devin/config.json |
anyone | ssh <machine> ~/.local/bin/aifoundry-agents fix (it runs sessionpipe install --devin --backfill 0) |
| Devin · Down | The machine has an outpost, but devin-worker.service is not active |
anyone | ssh <machine> systemctl --user restart devin-worker.service; its log: journalctl --user -u devin-worker.service -n 30 |
| Devin · Not installed | ~/.local/bin/devin is missing |
him (then a sign-in) | curl -fsSL https://cli.devin.ai/install.sh -o /tmp/devin-install.sh && bash /tmp/devin-install.sh </dev/null, then aifoundry_agents fix <machine> |
| Devin · Unknown | devin auth status did not answer within 25 s |
anyone | devin auth status on the machine |
| Machine · sessionpipe not paired | spacesheep cannot message sessions on the machine (its hooks still save them) | him | aifoundry_agents fix <machine>: it prints a six-digit code; type it at https://spacesheep.dev/pair on the device with his passkey |
| Codex · other hooks wait for review (warning) | A Codex hook that is not sessionpipe's | him | In codex, /hooks. codex-hooks trust never approves those |
| Codex · sandbox blocked (warning) | Codex's bubblewrap sandbox cannot create a user namespace: Ubuntu denies them to programs AppArmor does not confine (sessionpipe's daemon, ssh, cron). Each command fails once, then runs outside the sandbox after an automatic review (LESSONS.md §7.7) | him (root) | On the machine: sudo bash ~/claude/aifoundry-setup/setup/codex-apparmor.sh; for aifoundry1 or aifoundry3 from aifoundry2: ssh root@aifoundryN 'bash -s' < ~/claude/aifoundry-setup/setup/codex-apparmor.sh. It installs an AppArmor profile for his Codex binary alone and checks that the sandbox then starts |
| Machine · watchdog off | A cron line is missing | anyone | claudes watch on, agys watch on (fix does both) |
| Machine · watchdog stale (over 3 min) | Cron stopped running it, or a lock is stuck | anyone | crontab -l, ~/.claudes/watch.log. A tmux server started inside the lock keeps it (LESSONS.md §2.6) |
| Machine · scripts differ from the repo | The installed claudes, agys, agy-turbo or aifoundry-agents is not this checkout's |
anyone | aifoundry_agents install |
| Machine · no bypass default | Claude's settings.json lacks what aifoundry2 has (LESSONS.md §3.1) |
him | answer yes in aifoundry_agents fix (it runs setup/claude-settings-defaults.sh) |
| Machine · linger off | tmux dies at the last logout | him (may need root) | loginctl enable-linger yaroslavvb |
| Machine · disk low | Under 5 GB free in the home | anyone | Old scratchpad copies first (~/claude/private/tmp-claude-*), never another user's files |
6. The commands
~/git0/flush-util/aifoundry_agents (on either Mac) runs the machine's own aifoundry-agents over ssh, one
machine after another:
aifoundry_agents [status] [machines]: each machine's agents, live or not, with the fix (machines: aifoundry1–3 and mordast).aifoundry_agents fix [machines]: does what needs nobody, then asks before each of his steps. These are the first-run answers (consent), sign-ins (it prints the link and reads the code without showing it), the bypass default, turbo, a renewal within 7 days of a lapse, and a restart of a disconnected daemon. Run it in a terminal.aifoundry_agents install [machines]: brings each machine's checkout up to date (git pullon aifoundry2, anrsyncfrom aifoundry2 on aifoundry1 and aifoundry3, as HOSTS.md does; mordast, which reaches neither GitHub's private repo nor the lab, gets a copy streamed from the Mac's checkout), then runs itsaifoundry-agents install. That puts the changed scripts into~/.local/binby rename, so running loops keep their copy, and reinstalls the stream.- If ssh prints "Tailscale SSH requires an additional check" with a login.tailscale.com link, open the link. The command then goes on by itself. If TailMux is not running, the script starts it first.
~/.local/bin/aifoundry-agents (on each machine, from bin/ here) does the same things there: status [--json],
fix, consent <ACCT>, codex-hooks [trust [--yes]], install, and stream [install|remove|status].
consent <ACCT> gives the answers he would type in tmux. ACCT is a key, an email, a handle (yvb yvb2 yvb3
mlc sheep) or an unambiguous shortening; 🛑 a bare number is refused and the refusal names the account that
number used to mean (Tue 13 Oct 2026, week 42 — the numbers 4 and 5 had swapped accounts on 10 Oct, so a number read
as a row position would be right only by luck). It marks the welcome screens done, trusts ~/claude, and
answers yes to "Enable Remote Control?". It first takes the watchdog's lock and closes the window that waits for the
answers (otherwise the closing TUI or the next watchdog run can overwrite or race the write). Then it writes
hasCompletedOnboarding, projects["~/claude"].hasTrustDialogAccepted and remoteDialogSeen into the account's
.claude.json, and starts the server. It asks on the terminal and refuses without one.
codex-hooks shows Codex's own list of its hooks (hooks/list, what /hooks shows) with each one's review state.
codex-hooks trust approves the ones that are sessionpipe's (from ~/.codex/hooks.json, running
~/.local/share/sessionpipe/sessionpipe-hook codex <event>) and wait for review, with the same two calls Codex's own
/hooks makes, so Codex computes the hashes itself (LESSONS.md §7.2). It asks on the terminal; --yes is only for
when he asked for it in his own words. fix also signs Codex in (codex login --device-auth) when he says yes.
The rest is in README.md: claudes (status, up, watch, login, pin, resume, new, pane, serve, homes, homes
migrate), agys (status, up, update, busy,
restart, stop, watch, login, code, new), agy-turbo (on, off, show, check). tools/agy-schema.py prints the
settings an agy binary knows (after an update, to see what changed).
7. Rules
- His steps are his: first-run answers, every sign-in, approving Codex hooks, and turning on bypass or turbo. Hand them over; never answer them.
- Never print, copy or commit a login:
~/.claude*/.credentials.json,~/.gemini/**/*token*,~/.codex/auth.json,~/.config/gh,~/.config/spacesheep,~/.ssh/id_*. A sign-in code goes into a terminal, never a chat. - Kill only by a pid that
claudes status,agys statusoraifoundry-agentsnames as yours. Never by pattern: other lab users run Claude too (LESSONS.md §1.4). - Every account is explicit — never set
CLAUDE_CONFIG_DIR=~/.claude, and never leave it unset either. Spell the account's own~/.claude-<key>, or useclaude_as <handle|key|email>/claude_yvb…claude_sheep. A non-empty~/.claudetakes the CLI's hashed-credential branch and lands on an empty slot that reads exactly like logged out; an unset one named account 1 until Tue 13 Oct 2026 (week 42) and now names no account at all, so a bare interactiveclauderefuses (overrideCLAUDE_ALLOW_DEFAULT_HOME=1).~/.claudeis the shared settings dir and holds no login here (LESSONS.md §1.2, and his ask "have a guard against using the default home. Every account should be explicit"). - Never stop the server or daemon your own session runs in (§4).
- Nothing private goes on a lab machine: no gyroscope checkout, no people notes, no vault text. Root is shared and tailnet members can log in as other users (LESSONS.md §1.11).
- Never touch the ET-SoC-1 cards (
/dev/et*) for this work. - The dashboard stays free of names, ids, paths and secrets (§3).
8. Reaching the machines
- From the Intel and the M5:
ssh aifoundryNgoes through TailMux's SOCKS router on127.0.0.1:43101(gyroscope_service/service-tailscale.md). Two traps, both seen Wed 7 Oct 2026:- TailMux was not running after the Intel's reboot.
open -g -a TailMuxfixed it;aifoundry_agentschecks for it. - AI Foundry's tailnet puts ssh in Tailscale's check mode. A Mac's first ssh after a while prints "Tailscale SSH
requires an additional check" and a
login.tailscale.com/a/…link, then waits. Open the link and sign in as yaroslavvb@gmail.com. An approval lasts for the tailnet's check period (Tailscale's default is 12 hours); on 7 Oct each machine printed its own link.
- TailMux was not running after the Intel's reboot.
- Between the lab machines: plain
ssh aifoundry1|2|3works without prompts (aifoundry2 to aifoundry1 and aifoundry3, verified 7 Oct 2026). - mordast:
ssh mordastgoes through the same SOCKS router, on TailMux's second profile for that tailnet; on 9 Oct 2026 its Tailscale SSH asked for no browser check. - From the phone: no ssh, because TailMux doesn't run on Android. Use the dashboard, and hand its "ask an agent" prompt to a Claude session on aifoundry2 or the Intel.
9. Files
| File | What it is |
|---|---|
bin/aifoundry-agents |
status, fix, consent, install and the dashboard stream, on each machine |
bin/claudes, bin/agys, bin/agy-turbo |
the Claude accounts' servers, the Antigravity daemon, turbo |
claude_accounts.tsv → ~/.config/claude-accounts.tsv |
the accounts table: the only place an account, its home, its tmux session and its expected login are written. A byte-identical copy of ~/git0/flush-util/claude_accounts.tsv |
~/.local/bin/codex → ~/.codex/packages/standalone/current/bin/codex |
Codex, OpenAI's standalone install (a native binary; it updates itself) |
~/.codex/hooks.json, ~/.codex/config.toml |
sessionpipe's Codex hooks (written by sessionpipe install --codex); config.toml holds sessionpipe's notify line and, under [hooks.state], the approvals |
dashboard/index.html |
the live dashboard's page |
agentic-setup.html, tools/md2page.py |
this file's published copy, and what regenerates it from this file |
~/git0/flush-util/aifoundry_agents |
the Mac side: runs the above over ssh (in flush-util, not here) |
~/.config/systemd/user/spacesheep-stream-aifoundry-agents.service |
the stream, written by aifoundry-agents stream install |
LESSONS.md, RESTORE.md, HOSTS.md |
the why; a rebuild; the agent on aifoundry1 or aifoundry3 |
10. Changes
-
Wed 14 Oct 2026 (week 42): Antigravity in full turbo, upgraded, and on mordast. His asks: "my Antigravity on Aifoundry asks permission, but I don't have a chance to modify it. I want everything to run in turbo mode, as permissive as possible", then "can you also upgrade Antigravity on all the machines, including Mordast?". A dashboard task on aifoundry1 had stopped to ask before reading
~/nekko/CLAUDE.md. Turbo was on, but turbo covers terminal commands and reviews only, and a dashboard task's "CLI Project" has no folder, so every file is outside the workspace (LESSONS.md §5.7).agy-turbo onnow sets every permissive setting agy has, in both files: files outside the workspace, internet, gitignored files, browser JavaScript, sandbox and secure mode off, and the allow rulescommand(*),read_file(/),write_file(/),mcp(*),read_url(*)andexecute_url(*). It also drops any less permissive project override.agy-turbo checktells whether all of it is on, and the dashboard's turbo warning uses it. It refuses to restart a daemon whose task is running, unless--now.- agy 1.3.5 on all three lab machines (from 1.2.16 on aifoundry2 and 1.3.1 on aifoundry1 and aifoundry3; 1.3.4 is
the version whose browser Settings opens for CLI sessions), each with a single daemon restart while idle. New
agys updateandagys busy;agysandaifoundry-agentsnow see a daemon left onagy.<n>.old, and the watchdog restarts it once idle (the 7 Oct trap).tools/agy-schema.pydecodes the settings schema from the binary. - mordast: agy 1.3.5 installed with Google's installer,
agys/agy-turboin place,TARGETSnow includesagy. Its Google sign-in is his. - Verified on aifoundry3: a headless run outside every workspace read
/etc/hostnameand~/.profile, wrote to/tmp, ranunameand fetched a page with no question.
-
Tue 13 Oct 2026 (week 42): the numbers are gone. On his ask ("can you do a refactor where you drop the numbers? IE, I want claude-yaroslavvb3-gmail not claude3-yaroslavvb3-gmail. I still have an ordering, but the ordering is implicit. The reason is that I may add or remove some accounts, and the numbers leave gaps"; scope he chose, "Everything, by name"; handles, "Short handles"; numbers, "Refuse with a hint"). An account is its key — the email's local part with
.→-, plus-, plus the first label of the domain — and every name is derived from it on all seven machines: home~/.claude-<key>, tmuxclaude-<key>, sign-in sessionreauth-<key>, launchdcom.yaroslavvb.claude-rc.<key>, registryclaude_rc_servers_<key>, logclaude-rc-<key>.log, lab slot labelClaude <handle>.claude_accounts.tsvgained two columns —handleandroles— and now has eight:key email home tmux_mac tmux_lab machines handle roles; order is row order and it is implicit, so adding or removing an account is one row with no gap to leave.- Handles are what he types:
yvbyvb2yvb3mlcsheepnekko. 🛑 The public stream carries the handle, never the key, so the dashboard does not publishyaroslavvb2oryvb-agent-spacesheep. - 🛑 A bare number is refused with a hint, never read as a row position:
claudes login 3answers "numbers are gone: account 3 was yaroslavvb3-gmail; try: claudes login yvb3". The one exception is an existingpinsfile, translated by the frozen legacy order so his pins carry over instead of being unpinned. Anything written before today that says "account N" must be read by its EMAIL. - Every account is explicit. The table refuses a
-home;bin/claudes,bin/aifoundry-agentsand~/.bash_aliasesnever start Claude without aCLAUDE_CONFIG_DIR; the~/.claude/.credentials.jsonon each lab box and on mordast was moved into its keyed home, so~/.claudeis the shared settings dir with no login and a bareclauderefuses (his ask: "Fix everything and also maybe have a guard against using the default home. Every account should be explicit"). - Deployed 13:5x–13:58 PDT with
claudes homes migrate --apply --retire-oldon aifoundry1, aifoundry2, aifoundry3 and mordast: accounts 2–5 moved with their logins, the gmail account's login moved out of~/.claudeinto its keyed home, ~3 GB of transcripts copied, and his pinned sessioned6d06d5restarted asyaroslavvb-gmailinclaude-yaroslavvb-gmail:main. ⚠️ A killed CLI re-creates its old home: five stray old-path homes came back after their move (aifoundry1, aifoundry3, and two on mordast including the vault sessionc8be3397) and were merged into the keyed home and removed. mordast's~/.claude-kimi-modaland~/.claude-glm-zaiare other providers' homes and were left alone. The target is 30 (thenekkoplaceholder serves nothing). - Also new:
claudes resume <ACCT> <id>on a lab box, andclaude_session_mover/csmon a Mac, hand a session to another account's quota — list the sessions, move the transcript into the target home, resume it there (his ask: "I want to be able to move a session to a different account … so if I'm out of quota, I'll move a session to some other account"). ⚠️ The moved session connects as a NEW claude.ai session: the agent keeps the whole conversation, the phone scrollback starts at the move.
- Handles are what he types:
-
Sun 11 Oct 2026 (week 41): on his ask ("the tmux session numbering is wrong, so ensure there's consistency everywhere … the names of sessions should be in the order used, but also the names should be self-contained. Use the convention for the home directories") — superseded two days later by the keyed names above: every Claude tmux session became
claude<n>-<account>—claude1-yaroslavvb-gmail,claude2-yaroslavvb2-gmail,claude3-yaroslavvb3-gmail,claude4-yaroslavvb-mlcollective,claude5-yvb-agent-spacesheep,claude6-yaroslav-nekko— on the Macs and on every machine here, the same six names in both columns ofclaude_accounts.tsv. The number leads sotmux lslists them in his numbering, and the rest is the home's own words, so the session names its own account: under the old names tmuxclaude4held the Spacesheep seat, which this table calls account 5, and the lab's account 1 was called plainclaudewhile the Macs called itrc. The window is stillrc; only the session changed. ⚠️ Target a session with an exact match,-t '=claude2-yaroslavvb2-gmail'— tmux matches prefixes, so a bare-t claude2lands on the right session today and the wrong one as soon as two names share a prefix. -
Sat 10 Oct 2026 (week 41), late afternoon: on his ask ("I'll use this numbering for a while", and "the .claude-yv4 should have enough information to figure out original account"): six accounts in one numbering, and every config home named after the login it holds (
~/.claude-yaroslavvb2-gmail,~/.claude-yvb-agent-spacesheep, …) instead of~/.claude-yvN, which named no account while two homes that week turned out to hold another account's login with every check green. Accounts 4 and 5 swapped numbers in the renumbering and account 6 (yaroslav@nekko.ai) is new, so a machine moves over withclaudes homes migrate(a dry run) then--apply, which keys every move on the login a home holds, never on its number. The target was 34 that day (it is 30 since thenekkorow became a placeholder and stopped being counted). -
Sat 10 Oct 2026 (week 41): on his ask (all four of his Claude accounts on every backend machine, each controllable from its own phone): accounts 3 (
yaroslavvb3@gmail.com) and 4 (yvb-agent@spacesheep.dev) joined every machine here, so the target is 26. The two hand-kept account lists became one table,claude_accounts.tsv, read bybin/claudesandbin/aifoundry-agentsand filtered per machine;install.shandsetup/*.shloop its homes (claudes homes) instead of naming.claude-yv2;aifoundry-agents installplaces the table, each config home (mode 700) and itssettings.jsonsymlink. After a login,aifoundry-agentsreads the email the home actually holds and says WRONG ACCOUNT at once instead of leaving it to the next status pass (LESSONS.md §1.8), and the dashboard draws as many Claude rows as a machine streams. -
Fri 9 Oct 2026 (week 41): on his ask ("Set up my agentic infrastructure on mordast … two Claude agents, both accounts … as well as Devin. Make sure there is a watcher on Intel which periodically checks and fixes … Authorize sessionpipe, get sessionpipe working, as well as spacesheep login"): mordast is a fourth machine (both Claude accounts and Devin, with its outpost and sessionpipe at tier 2),
aifoundry-agentshas per-machine targets and a Devin slot, Devin is on every machine (aifoundry2 got it, with its outpost, the same evening) and on the dashboard,fixoffers the sessionpipe pairing, and the Intel'saifoundry_agents_watchdogwatches all four machines. -
Thu 8 Oct 2026 (week 41): the lab dashboard's keeper on aifoundry2 and aifoundry3 and its standby on aifoundry3 (§2), after the dashboard froze for 21 hours; the history page every 15 minutes.
-
Wed 7 Oct 2026 (week 41): created on his ask ("an AI Foundry maintenance procedure … something I can point my agents at … resistant to restarts … a separate live dashboard"). Added
aifoundry-agents, its 15-second stream on all three machines, the dashboard, flush-utilaifoundry_agents, and this file. He decided on one Antigravity account per machine, so the target is nine agents. Found the same day: the Macs' ssh to the lab needs a Tailscale check approval, and TailMux did not come back after the Intel rebooted. -
Wed 7 Oct 2026, afternoon: Codex, on his ask ("Make sure codex is installed on all of the machines, including this one, and sessionpipe approved … have it working on all three machines and integrate it into the dashboard"). Codex 0.161.0 on all three machines (OpenAI's standalone installer), sessionpipe's Codex hooks written on aifoundry1 and aifoundry3 (aifoundry2 had them since 2 Oct) and approved in Codex on all three;
aifoundry-agentsreports a fourth agent per machine (codex-hooks, Codex infix), and the dashboard shows it: the target is twelve agents. He signed Codex in on all three at 15:22 (device codes), so 12 of 12 were live. Test sessions found that Codex's sandbox cannot start for unconfined programs (sessionpipe's daemon among them): the dashboard warns, andsetup/codex-apparmor.shis his root fix. -
Wed 7 Oct 2026, 15:2x: he made this page public and pointed the lab's Discord at the setup ("So you can point your agents at it to do something similar"). The opening states his design principle from that post; the "(private)" labels went; the links into this repo became plain names, because the repo stays private: it holds email addresses (his call). The account emails stay on the page (his call).